OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=2^2 mod(5)=4 mod(5)=4.
a(2)=3^2 mod(7)=9 mod(7)=2.
a(3)=5^2 mod(11)=25 mod(11)=3.
a(4)=7^2 mod(13)=49 mod(13)=10.
MATHEMATICA
PowerMod[#[[1]], 2, #[[3]]]&/@Partition[Prime[Range[80]], 3, 1] (* Harvey P. Dale, May 30 2023 *)
PROG
(PARI) a(n) = prime(n)^2 % prime(n+2) \\ Michel Marcus, Aug 06 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Umut Uludag, Jan 07 2011
EXTENSIONS
General formula corrected by Umut Uludag
STATUS
approved