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!)
A348006 Largest increment in the trajectory from n to 1 in the Collatz map (or 3x+1 problem), or -1 if no such trajectory exists. 2
0, 0, 11, 0, 11, 11, 35, 0, 35, 11, 35, 11, 27, 35, 107, 0, 35, 35, 59, 11, 43, 35, 107, 11, 59, 27, 6155, 35, 59, 107, 6155, 0, 67, 35, 107, 35, 75, 59, 203, 11, 6155, 43, 131, 35, 91, 107, 6155, 11, 99, 59, 155, 27, 107, 6155, 6155, 35, 131, 59, 203, 107 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The largest increment occurs when the trajectory reaches its largest value via a 3x+1 step.
All nonzero terms are odd, since they are of the form 2k+1, for some k >= 5.
LINKS
FORMULA
If n = 2^k (for k >= 0), a(n) = 0; otherwise a(n) = 2*A087232(n)+1 = (2*A025586(n)+1)/3 = A025586(n)-A087232(n).
EXAMPLE
a(3) = 11 because the trajectory starting at 3 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, and the largest increment (from 5 to 16) is 11.
a(4) = 0 because there are only halving steps in the Collatz trajectory starting at 4.
MATHEMATICA
nterms=100; Table[c=n; mr=0; While[c>1, If[OddQ[c], mr=Max[mr, 2c+1]; c=3c+1, c/=2^IntegerExponent[c, 2]]]; mr, {n, nterms}]
PROG
(Python)
def A348006(n):
c, mr = n, 0
while c > 1:
if c % 2:
mr = max(mr, 2*c+1)
c = 3*c+1
else:
c //= 2
return mr
print([A348006(n) for n in range(1, 100)])
(PARI) a(n)=n>>=valuation(n, 2); my(r); while(n>1, my(t=2*n+1); n+=t; n>>=valuation(n, 2); if(t>r, r=t)); r \\ Charles R Greathouse IV, Oct 25 2022
CROSSREFS
Sequence in context: A342123 A187553 A003621 * A338827 A055963 A127805
KEYWORD
nonn,easy
AUTHOR
Paolo Xausa, Oct 02 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 April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)