OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 3 since prime(prime(4)) (mod prime(4)) = prime(7) (mod 7) = 17 (mod 7) = 3. - Michael De Vlieger, Mar 25 2017
MAPLE
a:= n-> (p-> irem(ithprime(p), p))(ithprime(n)):
seq(a(n), n=1..70); # Alois P. Heinz, Oct 09 2015
MATHEMATICA
Table[Mod @@ Map[Nest[Prime, n, #] &, {2, 1}], {n, 65}] (* Michael De Vlieger, Mar 25 2017 *)
PROG
(PARI) a(n) = prime(prime(n)) % prime(n); \\ Michel Marcus, Mar 25 2017
KEYWORD
nonn,look
AUTHOR
Labos Elemer, Oct 08 2002
STATUS
approved