The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A349325 Number of times the Collatz plot started at n crosses the y = n line, or -1 if the number of crossings is infinite. 4
1, 1, 2, 1, 2, 3, 4, 1, 4, 1, 2, 1, 2, 5, 2, 1, 4, 5, 6, 1, 2, 3, 2, 1, 6, 1, 4, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 3, 4, 1, 6, 1, 4, 1, 2, 3, 4, 1, 4, 1, 2, 1, 2, 7, 6, 1, 6, 1, 2, 3, 4, 7, 6, 1, 4, 1, 2, 1, 2, 3, 6, 1, 10, 1, 2, 1, 2, 5, 2, 1, 4, 5, 6, 1, 2, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The plots considered are the trajectories from n to 1 of the 3x+1 function, denoted by T(x) in the literature, defined as T(x) = (3x+1)/2 if x is odd, T(x) = x/2 if x is even (A014682).
The starting value of the trajectory is considered a crossing.
A similar sequence for the "standard" Collatz function (A006370) is A304030.
Conjecture: every positive integer appears in the sequence infinitely many times.
REFERENCES
J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, American Mathematical Society, 2010.
LINKS
J. C. Lagarias, The 3x+1 Problem: An Overview, arXiv:2111.02635 [math.NT], 2021.
FORMULA
a(2^k) = 1, for integers k >= 0.
a(A166245(m)) = 1 for m>=1. - Michel Marcus, Nov 16 2021
EXAMPLE
The trajectory starting at 7 is 7 -> 11 -> 17 -> 26 -> 13 -> 20 -> 10 -> 5 -> 8 -> 4 -> 2 -> 1, so the Collatz plot crosses the y = 7 line at the beginning, from 10 to 5, from 5 to 8 and from 8 to 4, for a total of 4 times. a(7) is therefore 4.
MATHEMATICA
nterms=100; Table[h=1; prevc=c=n; While[c>1, If[OddQ[c], c=(3c+1)/2; If[prevc<n&&c>n, h++], c/=2^IntegerExponent[c, 2]; If[prevc>n&&c<n, h++]]; prevc=c]; h, {n, nterms}]
PROG
(Python)
def A349325(n):
prevc = c = n
h = 1
while c > 1:
if c % 2:
c = (3*c+1) // 2
if prevc < n and c > n: h += 1
else:
c //= 2
if prevc > n and c < n: h += 1
prevc = c
return h
print([A349325(n) for n in range(1, 100)])
(PARI) f(n) = if (n%2, (3*n+1)/2, n/2); \\ A014682
a(n) = {my(nb=1, prec=n, next); while (prec != 1, next = f(prec); if ((next-n)*(prec-n) <0, nb++); prec = next; ); nb; } \\ Michel Marcus, Nov 16 2021
CROSSREFS
Sequence in context: A308897 A353293 A162190 * A134292 A344006 A353319
KEYWORD
nonn
AUTHOR
Paolo Xausa, Nov 15 2021
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 May 23 07:28 EDT 2024. Contains 372760 sequences. (Running on oeis4.)