cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

2, 11, 41, 251, 2579, 32609, 543131, 10243031, 233336819, 6703033091, 207263540933, 7628002016027, 311878266460847, 13394639616667427, 628284422215925129, 33217442899664876729, 1955977793054900415107, 119244359152469819863541
Offset: 1

Views

Author

Jean-Marc Rebert, Nov 07 2015

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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
Showing 1-1 of 1 results.