Solutions of $x^2 = x + 1$ in $\mathbb Z/n\mathbb Z$ In a stage preceding the national stage of the math olympiad in Romania ( which was held online because of the pandemic ) the following question was asked:
If $A$ is the set of natural numbers $n$ for which $x^2=x+1$ has only a solution in $\mathbb Z/n\mathbb Z$ then:
A) $A$ has no elements
B) $A$ has only one element
C) The elements of $A$ are even
D) $A$ has infinitely many elements
E) ( I can't remember it ).
The oficial answer was that $A$ has only one element but when I wrote a bit of code I found $5$, $46985$, $47209$ and more to be in $A$.
Can you help me characterise the numbers in $A$ a little bit more?
Edit: 
 A: If $n=p_1^{r_1}\ldots p_m^{r_m}$ then by Chinese Remainder theorem, the solution is unique $\pmod n\iff$ unique $\pmod{p_i^{r_i}}$ for every $i$. This in particular implies the solution is unique $\pmod{p_i}$.
First, we do the case when $n=p$ is prime. Obviously $p=2$ doesn't work. For other cases, we are now in a field with characteristic not $2$, so we can use the quadratic formula (being in a field guarantees we can factor into two linear factors; characteristic not 2 guarantees we can divide by 2). If there were to be a solution, the discriminant $\Delta=5$ must be a square. For it to be unique, $\frac{1+\sqrt5}2=\frac{1-\sqrt5}2$ (for a chosen square root of $5$), or equivalently $\sqrt5=0$. Hence $5=0$, and $p=5$. We check that $5$ indeed works.
Back to the original case: the prime case implies $n=5^m$ for some $m\geq1$ (since it can have no prime factor other than 5). But when $n=25$ there is already no solution (and if $m\geq 2$, a solution $\pmod{5^m}$ would give rise to a solution $\pmod{25}$, a contradiction) so $n=5$.
A: If $m$ is a solution, then so is $1-m.$ (Why?)
So if $m$ is unique, then $1-m\equiv m\pmod n.$ So $n$ must be odd, and thus $$m\equiv \frac{n+1}2\pmod n.$$
So $$\frac{(n+1)^2}4\equiv \frac{n+1}2+1\pmod n$$
Multiplying by $4,$ we get:
$$(n+1)^2\equiv 2(n+1)+4\pmod n$$
Which is equivalent to:
$$0\equiv n^2\equiv 5\pmod n$$
