login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293982 Length (= size) of the orbit of n under iterations of A293975: x -> x/2 if even, x + nextprime(x) if odd; or -1 if the orbit is infinite. 3
1, 5, 5, 5, 5, 8, 6, 13, 5, 11, 9, 9, 7, 10, 14, 8, 6, 14, 12, 14, 10, 12, 10, 13, 8, 19, 11, 17, 15, 11, 9, 17, 7, 17, 15, 15, 13, 15, 15, 13, 11, 15, 13, 18, 11, 16, 14, 22, 9, 16, 20, 14, 12, 18, 18, 16, 16, 14, 12, 12, 10, 10, 18, 22, 8, 20, 18, 20, 16, 18, 16, 16, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

The orbit of x under f is O(x; f) = { f^k(x); k = 0, 1, 2,... }.

It is conjectured that for f = A293975, the trajectory (f^k(x); k >= 0) ends in the cycle 1 -> 3 -> 8 -> 4 -> 2 -> 1 for any starting value x.

LINKS

Harvey P. Dale, Table of n, a(n) for n = 0..1000

EXAMPLE

a(0) = 1 = # { 0 }, since 0 -> 0 -> 0 ... under A293975.

a(1) = 5 = # { 1, 3, 8, 4, 2 }, since 1 -> (1 + 2 =) 3 -> (3 + 5 =) 8 -> 4 -> 2 -> 1 -> 3 etc... under A293975.

a(2) = 5 = # { 2, 1, 3, 8, 4 }, since 2 -> 1 -> 3 -> 8 -> 4 -> 2 -> 1 etc... under A293975.

a(5) = 8 = # { 5, 12, 6, 3, 8, 4, 2, 1 }, since 5 -> (5 + 7 =) 12 -> 6 -> 3 -> (3 + 5 =) 8 -> 4 -> 2 -> 1 -> 3 etc... under A293975.

MATHEMATICA

Table[Flatten[FindTransientRepeat[NestList[If[EvenQ[#], #/2, #+ NextPrime[ #]]&, n, 100], 3]]//Length, {n, 0, 80}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 13 2018 *)

PROG

(PARI) A293982(n, S=[n])={while(#S<#S=setunion(S, [n=A293975(n)]), ); #S}

CROSSREFS

Cf. A293975, A174221 (the "PrimeLatz" map), A006370 (the "3x+1" map).

Sequence in context: A105444 A240233 A033299 * A071577 A003870 A304681

Adjacent sequences:  A293979 A293980 A293981 * A293983 A293984 A293985

KEYWORD

nonn

AUTHOR

M. F. Hasler, Nov 05 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 19:00 EDT 2019. Contains 325144 sequences. (Running on oeis4.)