login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A291302 a(n) = number of steps to reach a prime 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
0, 1, 1, 2, 1, 3, 3, 1, 3, 4, 46, 57, 7, 9, 17, 1, 45, 1, 33, 8, 10, 4, 3, 32, 6, 47, 17, 21, 41, 17, 12, 11, 10, 31, 74, 25, 99, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
2*3*5*7*11*13 = 30030 -> 96767 -> 111359 -> 117239 takes three steps to reach a prime, so a(6) = 3.
MAPLE
A291302 := proc(n)
local a, x ;
a := 0 ;
x := mul(ithprime(i), i=1..n) ;
while not isprime(x) do
x := numtheory[sigma](x)-1 ;
a := a+1 ;
end do:
a ;
end proc: # R. J. Mathar, Sep 12 2017
MATHEMATICA
p[n_]:=Times@@Prime/@Range[n]; f[n_]:=DivisorSigma[1, n]-1;
a[n_]:=Length[NestWhileList[f, p[n], CompositeQ]]-1; a/@Range[34] (* Ivan N. Ianakiev, Sep 01 2017 *)
PROG
(Python)
from sympy import primorial, isprime, divisor_sigma
def A291302(n):
m, c = primorial(n), 0
while not isprime(m):
m = divisor_sigma(m) - 1
c += 1
return c # Chai Wah Wu, Aug 31 2017
CROSSREFS
Cf. A039654, A039653, A291301 (the prime reached).
Sequence in context: A238703 A185908 A234951 * A278493 A209334 A180975
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, Aug 31 2017
EXTENSIONS
a(11)-a(35) from Chai Wah Wu, Aug 31 2017
a(36)-a(38) from Ivan N. Ianakiev, Sep 01 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)