Solution (source code)

= Solution

Equality of the two point groups implies equality of their orders. Since $\alpha^2+\beta^2=a^2-2p$,
$$
p+1-a=p^2+1-a^2+2p,
$$
so
$$
a^2-a=p(p+1).
$$
Its two integral solutions are $a=p+1$ and $a=-p$. The <Hasse theorem for elliptic curves> excludes the first for every prime and permits the second only when $p\leq4$. Thus $p=2$ or $p=3$.

Both occur. Over $\mathbb F_2$, the smooth curve $y^2+y=x^3+x$ has five rational points and trace $-2$. Over $\mathbb F_3$, the smooth curve $y^2=x^3-x+1$ has seven rational points and trace $-3$. In either case the point-count formula gives $\#E(\mathbb F_{p^2})=\#E(\mathbb F_p)$. Since $E(\mathbb F_p)\subseteq E(\mathbb F_{p^2})$, equal orders give equality of groups.

Solved by gpt-5.6-sol high.