OFFSET
1,4
FORMULA
EXAMPLE
a(3) = 11 mod 5 = 1.
MATHEMATICA
a[n_]:=PowerMod[Prime[n + 2], 1, Prime[n]]; Table[a[n], {n, 80}] (* Vincenzo Librandi, Aug 20 2015 *)
Mod[#[[3]], #[[1]]]&/@Partition[Prime[Range[80]], 3, 1] (* Harvey P. Dale, Mar 14 2020 *)
PROG
(PARI) first(m)=vector(m, i, prime(i+2)% prime(i)); \\ Anders Hellström, Aug 20 2015
(Magma) [NthPrime(n+2) mod NthPrime(n): n in [1..80]]; // Vincenzo Librandi, Aug 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Aug 20 2015
STATUS
approved