OFFSET
1,1
COMMENTS
The corresponding sequence when (p+1) in the congruence is replaced with (p-1) seems to be A125854.
a(4) > 4262937421 if it exists.
MATHEMATICA
Select[Prime[Range[718*10^4]], PowerMod[(#+1)/2, #-1, #^2]==1&] (* Harvey P. Dale, May 14 2021 *)
PROG
(PARI) forprime(p=3, , my(x=(p+1)/2); if(Mod(x, p^2)^(p-1)==1, print1(p, ", ")))
CROSSREFS
KEYWORD
nonn,hard,bref,more
AUTHOR
Felix Fröhlich, Jan 24 2019
STATUS
approved