|
|
A058009
|
|
a(n) is obtained by applying the map k -> prime(k) n times, starting at n.
|
|
6
|
|
|
2, 5, 31, 277, 5381, 87803, 2269733, 50728129, 1559861749, 64988430769, 2428095424619, 119543903707171, 5519908106212193, 248761474969923757
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(3) is 31 because the third prime is 5, the fifth prime is 11 and for the 3rd iteration, the eleventh prime is 31.
To get a(4): 4 -> 7 -> 17 -> 59 -> 277.
|
|
MAPLE
|
a:= n-> (ithprime@@n)(n):
|
|
MATHEMATICA
|
Table[ Nest[ Prime, n, n ], {n, 1, 11} ]
|
|
PROG
|
(PARI) a(n) = my(k = n); for (j=1, n, k = prime(k); ); k; \\ Michel Marcus, Jan 01 2017
(Python)
from sympy import prime
k = n
for _ in range(n):
k = prime(k)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|