|
|
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.
|
|
5
|
|
|
2, 11, 71, 743, 6911, 117239, 2013983, 34836479, 921086711, 33596203871, 18754852859999, 1306753691335679, 2795529813471359, 200489563747397471, 7143750592470475271, 146095655504943513599, 161739770170976834876927, 543475838478389870591999, 317180662337566737324195839
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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
m = primorial(n)
while not isprime(m):
m = divisor_sigma(m) - 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|