OFFSET
0,2
COMMENTS
Related to the PrimeLatz conjecture, which states that if this map k -> a(k) is iterated, starting at any n >= 0, then the trajectory will eventually enter a loop.
Computations have shown that up to 10^8, there is only one loop (apart from the fixed point 0). It is given for example by terms 2 through 31 of A193230, the smallest of its 30 elements being 9.
See A293980 for the number of iterations required to reach an element of this loop, and for further study of trajectories under iterations of this map.
REFERENCES
Eric Angelini, Posting to Math Fun Mailing List, Nov 26, 2010
Bill Thurston, Posting to Math Fun Mailing List, Nov 26, 2010
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
E. Angelini, The PrimeLatz Conjecture [Cached copy, with permission]
MAPLE
f:=proc(n) local p; p:=nextprime;
if n mod 2 = 0 then n/2 else
n+p(n)+p(p(n))+p(p(p(n))); fi; end;
MATHEMATICA
Array[If[EvenQ@ #, #/2, Total@ Prepend[NextPrime[#, {1, 2, 3}], #]] &, 85, 0] (* Michael De Vlieger, Oct 25 2017 *)
PROG
(PARI) A174221(n)=bittest(n, 0)||return(n\2); n+sum(c=1, 3, n=nextprime(n+1)) \\ M. F. Hasler, Oct 25 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 26 2010
STATUS
approved