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!)
A054575 Number of iterations to reach new prime in A054574. 2
4, 2, 2, 2, 3, 2, 2, 2, 2, 2, 5, 2, 10, 2, 3, 3, 2, 3, 3, 3, 3, 2, 2, 2, 2, 4, 2, 3, 3, 3, 2, 3, 3, 2, 2, 6, 18, 2, 2, 2, 16, 3, 16, 4, 2, 2, 4, 3, 2, 4, 2, 2, 5, 3, 2, 3, 2, 3, 4, 6, 3, 2, 12, 10, 2, 2, 4, 2, 4, 2, 2, 10, 2, 4, 3, 2, 4, 2, 3, 2, 2, 9, 6, 2, 2, 20, 3, 2, 3, 3, 3, 2, 10, 15, 2, 2, 11, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(5)=3 because beginning at 11, the next prime, 47, is attained in 3 steps.
MATHEMATICA
f[n_] := n + Plus @@ Times @@@ FactorInteger@n; a[n_] := Length[NestWhileList[f, (p = Prime[n]), # == p || CompositeQ[#] &]] - 1; Array[a, 100] (* Amiram Eldar, Sep 07 2019 *)
CROSSREFS
Cf. A054574.
Sequence in context: A303577 A010314 A080133 * A129107 A341686 A353636
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Apr 11 2000
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 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)