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.

A291301 a(n) = prime that is eventually reached when x -> sigma(x)-1 is repeatedly applied to the product of the first n primes, or -1 if no prime is ever reached.

Original entry on oeis.org

2, 11, 71, 743, 6911, 117239, 2013983, 34836479, 921086711, 33596203871, 18754852859999, 1306753691335679, 2795529813471359, 200489563747397471, 7143750592470475271, 146095655504943513599, 161739770170976834876927, 543475838478389870591999, 317180662337566737324195839
Offset: 1

Views

Author

N. J. A. Sloane, Aug 31 2017

Keywords

Comments

A subsequence of A039654.

Examples

			2*3*5*7*11*13 = 30030 -> 96767 -> 111359 -> 117239 takes three steps to reach a prime, so a(6) = 117239.
		

Crossrefs

Cf. A039654, A000203, A002110, A291302 (number of steps).

Programs

  • Mathematica
    p[n_]:=Times@@Prime/@Range[n]; f[n_]:=DivisorSigma[1,n]-1;
    a[n_]:=Last[NestWhileList[f,p[n],CompositeQ]]; a/@Range[20] (* Ivan N. Ianakiev, Sep 01 2017 *)
  • Python
    from sympy import primorial, isprime, divisor_sigma
    def A291301(n):
        m = primorial(n)
        while not isprime(m):
            m = divisor_sigma(m) - 1
        return m # Chai Wah Wu, Aug 31 2017

Extensions

a(10)-a(19) from Chai Wah Wu, Aug 31 2017