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!)
A336912 Number of steps to reach 1 in the 'x^3+1' problem (a variation of the Collatz problem), or -1 if 1 is never reached. 1
0, 1, 9, 2, 7, 2, 5, 2, 10, 10, 5, 10, 5, 10, 8, 3, 5, 3, 13, 3, 13, 3, 13, 3, 16, 8, 8, 8, 13, 8, 8, 8, 11, 8, 11, 3, 26, 3, 21, 3, 6, 3, 8, 3, 8, 3, 8, 3, 16, 6, 16, 6, 16, 6, 16, 6, 6, 6, 16, 6, 16, 6, 6, 3, 6, 3, 16, 3, 21, 3, 6, 3, 11, 3, 11, 3, 29, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The x^3+1 map, which is a variation of the 3x+1 (Collatz) map, is defined for x >= 0 as follows: if x is odd, then map x to x^3+1; otherwise, map x to floor(sqrt(x)).
It seems that all x^3+1 trajectories reach 1; this has been verified up to 10^10.
LINKS
EXAMPLE
For n = 3, a(3) = 9, because there are 9 steps from 3 to 1 in the following trajectory for 3: 3, 28, 5, 126, 11, 1332, 36, 6, 2, 1.
For n = 4, a(4) = 2, because there are 2 steps from 4 to 1 in the following trajectory for 4: 4, 2, 1.
PROG
(Python)
from math import floor, sqrt
def a(n):
if n == 1: return 0
count = 0
while True:
if (n % 2) == 0: n = int(floor(sqrt(n)))
else: n = n**3 + 1
count += 1
if n == 1: break
return count
print([a(n) for n in range(1, 101)])
CROSSREFS
Cf. A006370 (image of n under the 3x+1 map).
Cf. A336911 (image of n under the x^3+1 map).
Sequence in context: A224268 A019877 A252898 * A010537 A234371 A172423
KEYWORD
nonn
AUTHOR
Robert C. Lyons, Aug 07 2020
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 July 12 19:17 EDT 2024. Contains 374252 sequences. (Running on oeis4.)