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 A058009 #47 Jun 26 2021 09:19:20 %S A058009 2,5,31,277,5381,87803,2269733,50728129,1559861749,64988430769, %T A058009 2428095424619,119543903707171,5519908106212193,248761474969923757 %N A058009 a(n) is obtained by applying the map k -> prime(k) n times, starting at n. %H A058009 Piotr Miska and János T. Tóth, <a href="https://arxiv.org/abs/1908.10421">On interesting subsequences of the sequence of primes</a>, arXiv:1908.10421 [math.NT], 2019. See DiagP. %H A058009 Błażej Żmija, <a href="https://arxiv.org/abs/1909.12139">A note on primes with prime indices</a>, arXiv:1909.12139 [math.NT], 2019. %e A058009 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. %e A058009 To get a(4): 4 -> 7 -> 17 -> 59 -> 277. %p A058009 a:= n-> (ithprime@@n)(n): %p A058009 seq(a(n), n=1..8); # _Alois P. Heinz_, Jun 21 2019 %t A058009 Table[ Nest[ Prime, n, n ], {n, 1, 11} ] %o A058009 (PARI) a(n) = my(k = n); for (j=1, n, k = prime(k);); k; \\ _Michel Marcus_, Jan 01 2017 %o A058009 (Python) %o A058009 from sympy import prime %o A058009 def A058009(n): %o A058009 k = n %o A058009 for _ in range(n): %o A058009 k = prime(k) %o A058009 return k # _Chai Wah Wu_, Apr 06 2021 %Y A058009 Cf. A000040, A006450, A049090, ... %Y A058009 For composites, see A280327. - _Matthew Campbell_, Jan 01 2017 %K A058009 nonn,hard,more %O A058009 1,1 %A A058009 _Robert G. Wilson v_, Nov 13 2000 %E A058009 Edited by _N. J. A. Sloane_, Oct 30 2008 at the suggestion of _R. J. Mathar_ %E A058009 a(12)-a(13) from _Donovan Johnson_, Feb 17 2011 %E A058009 a(14) from _Giovanni Resta_, Sep 29 2019 %E A058009 a(13) corrected by _Daniel Suteu_, Jun 20 2021