OFFSET
1,1
COMMENTS
A subsequence of A039654.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..35
EXAMPLE
2*3*5*7*11*13 = 30030 -> 96767 -> 111359 -> 117239 takes three steps to reach a prime, so a(6) = 117239.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 31 2017
EXTENSIONS
a(10)-a(19) from Chai Wah Wu, Aug 31 2017
STATUS
approved