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.
%I A258937 #46 Jan 25 2022 13:57:05 %S A258937 2,11,41,251,2579,32609,543131,10243031,233336819,6703033091, %T A258937 207263540933,7628002016027,311878266460847,13394639616667427, %U A258937 628284422215925129,33217442899664876729,1955977793054900415107,119244359152469819863541 %N 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. %C A258937 If p is prime, we replace p with A260187(p), until A260187(p) is not prime. %C A258937 a(n) is the least prime for which the number of steps is n. %e A258937 a(3) = 41, because A260187(41) = 11, A260187(11) = 5 are prime and A260187(5) = 1 is not prime. %e A258937 Trajectories of the first few terms: %e A258937 2->0 %e A258937 11->5->1 %e A258937 41->11->5->1 %e A258937 251->41->11->5->1 %e A258937 2579->269->59->29->5->1 %e A258937 32609->2579->269->59->29->5->1 %e A258937 543131->32621->2591->281->71->11->5->1 %e A258937 10243031->543341->32831->2801->491->71->11->5->1 %e A258937 233336819->10243949->544259->33749->3719->1409->149->29->5->1 %e A258937 6703033091->233339861->10246991->547301->36791->6761->2141->41->11->5->1. %o A258937 (PARI) a260187(n)=my(t=1, k); forprime(p=2, , k=t*p; if(k>n, return(n%t), t=k)); %o A258937 isok(k,n) = {for (j=1, n-1, nk = 260187(k); if (! isprime(nk), return (0)); k = nk;); ! isprime(a260187(k));} %o A258937 a(n) = {my(k = 2); while(! isok(k, n), k = nextprime(k+1)); k;} \\ _Michel Marcus_, Nov 16 2015 %Y A258937 Cf. A260187, A260188. %K A258937 nonn,more %O A258937 1,1 %A A258937 _Jean-Marc Rebert_, Nov 07 2015