<s>[INST] What is the solution number of the equation $x^2-x+1\equiv 0 \pmod{p^e}$ What is the solution number of the equation
$$x^2-x+1\equiv 0\pmod{p^e}$$
I know when $e=1$, it is $1+\left(\frac{-3}{p}\right)$, and I guess it is the same for $e>1$, but can anyone provide a proof?
updated:
I know when $e=1$, the number is 
$$
1+\left(\frac{-3}{p}\right)
$$
When $e>1$, it is said that the answer is the same, saying that 
$$
1+\left(\frac{-3}{p}\right)=1+\left(\frac{-3}{p^e}\right)
$$
That's what puzzling me.
 [/INST] If $p>2,$$$p^e\mid (x^2-x+1)\iff p^e\mid (2x-1)^2+3$$
So, $$(2x-1)^2\equiv-3\pmod{p^e}$$
Applying Discrete Logarithm w.r.t some primitive root $g\pmod {p^e}$,
$2ind_g(2x-1)\equiv ind_g(-3)\pmod{p^{e-1}(p-1)}$ as $\phi(p^e)=p^{e-1}(p-1)$ 
Using Linear congruence theorem, the last equation is solvable iff $(2,p-1)\mid ind_g(-3)\iff 2\mid ind_g(-3)$ and in that case it has exactly $(2,p-1)=2$ solutions.
Now we can prove,  $-3$ is a quadratic residue of $p^e,$ iff it is a quadratic residue modulo $p$ (See below)
So, the number of solutions of $$(2x-1)^2\equiv-3\pmod{p^e}$$  is $0=1-1$ or $2=1+1$ i.e. is $1+\left(\frac{-3}p\right)$ for all prime $p>3$
[Proof:
Now,  if $-3$ is a quadratic residue modulo $p^s$ so there exists an integer $y$ such that $p^s\mid(y^2+3)\implies y^2+3=a\cdot p^s$ for some positive integer $a$
Now, $(y+b\cdot p^s)^2+3=y^2+3+2y\cdot b\cdot p^s+b^2p^{2s}=a\cdot p^s+2y\cdot b\cdot p^s+b^2p^{2s}$
If $p^{s+1}\mid (a\cdot p^s+2y\cdot b\cdot p^s+b^2p^{2s})\iff p\mid (a+2b)$ if $2s\ge s+1\iff s\ge 1$
$\implies 2b\equiv-a\pmod p$  
so if $y^2\equiv-3\pmod{p^s}$ is solvable so will be $y^2\equiv-3\pmod{p^{s+1}}$
Using induction we say $-3$ is a quadratic residue of $p^e$ if it is  a quadratic residue of $p$ for $e>1.$ 
Again if for $e>1,p^e\mid(y^2+3)\implies p\mid (y^2+3),$ 
so if $-3$ is a quadratic residue of $p^e,$ then it is a quadratic residue modulo $p$
So,  $-3$ is a quadratic residue of $p^e,$ iff it is a quadratic residue modulo $p$]
</s>