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.

A344946 x -> prime(x) iterated prime(n) times, evaluated at n.

Original entry on oeis.org

3, 11, 709, 167449, 88362852307, 156740126985437, 1172447586903041169661
Offset: 1

Views

Author

Paolo Xausa, Jun 03 2021

Keywords

Examples

			a(1) = prime(prime(1)) = 3.
a(2) = prime(prime(prime(2))) = 11.
a(3) = prime(prime(prime(prime(prime(3))))) = 709.
		

Crossrefs

Programs

  • Mathematica
    nterms=6;Table[Nest[Prime[#]&,n,Prime[n]],{n,nterms}]
  • PARI
    a(n) = my(p = n); for (k=1, prime(n), p=prime(p)); p; \\ Michel Marcus, Jun 03 2021
  • Python
    from sympy import prime
    def a(n):
      iter = pn = prime(n)
      for i in range(1, pn): iter = prime(iter)
      return iter
    print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Jun 03 2021
    

Formula

a(n) = prime^{prime(n)}(n), with prime^{0}(n) = n and prime^{k}(n) = prime(prime^{k-1}(n)) for 1 <= k <= prime(n).
a(n) = prime(prime(...(n))) {prime(n) times}.

Extensions

a(7) from Jinyuan Wang, Jul 12 2021