login
A258937
Define f_i as the i-th iterate of A260187. a(n) is the least prime for which f_i(a(n)) is prime for all i such that 0 <= i < n and f_n(a(n)) is not prime.
0
2, 11, 41, 251, 2579, 32609, 543131, 10243031, 233336819, 6703033091, 207263540933, 7628002016027, 311878266460847, 13394639616667427, 628284422215925129, 33217442899664876729, 1955977793054900415107, 119244359152469819863541
OFFSET
1,1
COMMENTS
If p is prime, we replace p with A260187(p), until A260187(p) is not prime.
a(n) is the least prime for which the number of steps is n.
EXAMPLE
a(3) = 41, because A260187(41) = 11, A260187(11) = 5 are prime and A260187(5) = 1 is not prime.
Trajectories of the first few terms:
2->0
11->5->1
41->11->5->1
251->41->11->5->1
2579->269->59->29->5->1
32609->2579->269->59->29->5->1
543131->32621->2591->281->71->11->5->1
10243031->543341->32831->2801->491->71->11->5->1
233336819->10243949->544259->33749->3719->1409->149->29->5->1
6703033091->233339861->10246991->547301->36791->6761->2141->41->11->5->1.
PROG
(PARI) a260187(n)=my(t=1, k); forprime(p=2, , k=t*p; if(k>n, return(n%t), t=k));
isok(k, n) = {for (j=1, n-1, nk = 260187(k); if (! isprime(nk), return (0)); k = nk; ); ! isprime(a260187(k)); }
a(n) = {my(k = 2); while(! isok(k, n), k = nextprime(k+1)); k; } \\ Michel Marcus, Nov 16 2015
CROSSREFS
Sequence in context: A070778 A260267 A128241 * A347110 A225907 A107020
KEYWORD
nonn,more
AUTHOR
Jean-Marc Rebert, Nov 07 2015
STATUS
approved