<s>[INST] Prime divisors of $k^2+(k+1)^2$ It seems that the prime divisors of : $k^2+(k+1)^2$ are of the form $4k'+1$, and that they can be only one prime divisor of $k^2+(k+1)^2$ of the form : $4k''+1$.
Yet I don't know how to prove this result, and how to study in general the prime divisors of : $k^2+(k+1)^2$. 
 [/INST] I know that I have proved this on this site, cannot find it. This time I have saved the link to my text file on my home computer, topics.txt
this is  Prime divisors of $k^2+(k+1)^2$
Let 
$$ f(x,y) = a x^2 + b xy + c y^2   $$ be a quadratic form with integer coefficients $a,b,c.$ Define the "discriminant"
$$ \Delta = b^2 - 4 a c.  $$
We demand that $\Delta \neq 0,1,4,9, \ldots$ That is, if $\Delta $ is non-negative, we require that it not be a square. 
Proposition: let $q$ be an odd prime with Legendre symbol
$$  (\Delta | q) = -1. $$
That is, $q$ does not divide $\Delta,$ and there is no integer $t$ such that $$ t^2 \equiv \Delta \pmod q. $$  IF we have integers $x,y$ such that
$$  a x^2 + b xy + c y^2 \equiv 0 \pmod q, $$
THEN
$$ q|x \; \; \; \mbox{AND} \; \; \; q | y. $$ Therefore we actually have $  a x^2 + b xy + c y^2 \equiv 0 \pmod {q^2} $
PROOF: The integers $\pmod q$ make a field. As we required $q$ odd, we know $4$ is invertible in $\mathbb Z/ q \mathbb Z.$ Next, we cannot have $q |a,$ because then we would have $(\Delta|q) = (b^2|q);$ we would have $b \neq 0 \pmod q,$ so we would get $(\Delta|q) = (b^2|q)= 1.$ But this would contradict the hypothesis $(\Delta|q) = -1.$
We therefore have  $4a \neq 0 \pmod q$ and the equivalent hypothesis
$$  4a^2 x^2 + 4ab xy + 4ac y^2 \equiv 0 \pmod q.  $$
$$  4a^2 x^2 + 4ab xy + b^2 y^2 - b^2 y^2 + 4ac y^2 \equiv 0 \pmod q.  $$
$$ \left( 4a^2 x^2 + 4ab xy + b^2 y^2 \right) - \left(b^2 - 4ac \right) y^2 \equiv 0 \pmod q.  $$
$$ \left( 4a^2 x^2 + 4ab xy + b^2 y^2 \right) - \Delta y^2 \equiv 0 \pmod q.  $$
$$ \left( 2ax + by \right)^2 - \Delta y^2 \equiv 0 \pmod q.  $$
$$ \left( 2ax + by \right)^2 \equiv \Delta y^2  \pmod q.  $$
We finally get to the prof by contradiction.
ASSUME $y \neq 0 \pmod q.$ In that case, $y$ has a multiplicative inverse in the field, call it $w,$ so $yw \equiv 1 \pmod q.$ Then $y^2 w^2 \equiv 1 \pmod q,$
$$ \left( 2ax + by \right)^2 w^2 \equiv \Delta y^2  w^2 \pmod q.  $$
$$ \left( (2ax + by \right) w)^2 \equiv \Delta  \pmod q.  $$
This is a CONTRADICTION of $(\Delta|q) = -1.$ We have shown that $y \equiv 0 \pmod q.$ In the original
$$  a x^2 + b xy + c y^2 \equiv 0 \pmod q, $$ this gives
$$  a x^2 \equiv 0 \pmod q. $$
Since we showed that $a \neq 0 \pmod q,$
$$   x^2 \equiv 0 \pmod q, $$ finally
$$   x \equiv 0 \pmod q. $$ Together, we have both $q|y$ and $q|x.$
</s>