OFFSET
2,2
COMMENTS
Also the square of (prime(n) - 1)/2 + 1 modulo prime(n).
EXAMPLE
The fourth prime is 7; ((7 - 1)/2)^2 = 3^2 = 9 = 2 mod 7. Hence a(4) = 2.
The fifth prime is 11; ((11 - 1)/2)^2 = 5^2 = 25 = 3 mod 11. Hence a(5) = 3.
MATHEMATICA
Table[PowerMod[(Prime[n] - 1)/2, 2, Prime[n]], {n, 2, 70}]
PROG
(PARI) a(n) = lift(Mod((prime(n)-1)/2, prime(n))^2); \\ Michel Marcus, Sep 19 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alonso del Arte, Sep 16 2017
STATUS
approved