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