Square Polynomials (mod 8) and Proving the Polynomial $f(x) = x^2 +ax+ 1$ Factors Prove: If $a$ is any integer and the polynomial $f(x) = x^2 +ax+ 1$ factors (poly $\bmod 8$), then $f(x)$ is in fact a square; i.e., $f(x) ≡ (x + c)^2$ (poly $\bmod 8$) for some non-negative integer $c$ less than $8$.
What are the possible values of $a$? That is, for which non-negative $a$ less than $8$ does $f(x)$ factor?
Help! I'm stuck on this problem. Note:(poly $\bmod 8$) is a polynomial $f(x)$ with integer coefficients which factors. 
 A: My guess is that the question is about factorization in the ring $\Bbb{Z}_8[x]$. This is a bit problematic, because factorization in this ring is not unique. For example $x^2=(x-4)^2$.
Hints: What is the relation between the constant terms of the factors and the constant term of the product? Note that here we are apparently only interested in monic linear factors. Also, what do you know about the squares of the residue classes of odd integers in the ring $\Bbb{Z}_8$? What does that say about their inverses?
A: So I think this is right:
We are searching all the integer values of $a$ such that
$x^2+ax+1=(x−α)(x−β)$
in $Z/8Z[x]$, for some $α,β∈Z$. In particular $αβ≡1(mod8)$, so that they are both odd, and $β=1/α$. Moreover, $a$ has to be equal to $−(α+β)$ (therefore, a has to be an even number). Recalling that if $d$ is odd then
$d^2≡1(mod 8)⟹ 1/d ≡d (mod 8)$,
we get that the polynomial can be rewritten, in $Z/8Z[x]$ as
$x^2−(α+1/α)x+1=x^2−2αx+1=(x−α)^2$.
However, I am brain-farting, and can't figure out "What are the possible values of a? That is, for which non-negative a less than 8 does f(x) factor?"
