login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033493 Sum of the numbers in the trajectory of n for the 3x+1 problem. 16
1, 3, 49, 7, 36, 55, 288, 15, 339, 46, 259, 67, 119, 302, 694, 31, 214, 357, 519, 66, 148, 281, 633, 91, 658, 145, 101440, 330, 442, 724, 101104, 63, 841, 248, 540, 393, 535, 557, 2344, 106, 101331, 190, 1338, 325, 497, 679, 100979, 139, 806, 708, 1130, 197 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Given a power of two, the value in this sequence is the next higher Mersenne number, or a(2^m) = 2^(m + 1) - 1. - Alonso del Arte, Apr 10 2009

a(n) = sum (A070165(k): 1 <= k <= A006577(n)). - Reinhard Zumkeller, Oct 08 2011

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Collatz Problem

Wikipedia, Collatz conjecture

Index entries for sequences related to 3x+1 (or Collatz) problem

EXAMPLE

a(5) = 36 because the Ulam's conjecture trajectory sequence starting on 5 runs 5, 16, 8, 4, 2, 1 and therefore 5 + 16 + 8 + 4 + 2 + 1 = 36. - Alonso del Arte, Apr 10 2009

MAPLE

a:= proc(n) option remember; n+`if`(n=1, 0,

      a(`if`(n::even, n/2, 3*n+1)))

    end:

seq(a(n), n=1..55);  # Alois P. Heinz, Jan 29 2021

MATHEMATICA

collatz[1] = 1; collatz[n_Integer?OddQ] := 3n + 1; collatz[n_Integer?EvenQ] := n/2; Table[-1 + Plus @@ FixedPointList[collatz, n], {n, 60}] (* Alonso del Arte, Apr 10 2009 *)

PROG

(Haskell)

a033493 = sum . a070165_row  -- Reinhard Zumkeller, Oct 08 2011

(Python)

def a(n):

    if n==1: return 1

    l=[n, ]

    while True:

        if n%2==0: n/=2

        else: n = 3*n + 1

        l+=[n, ]

        if n<2: break

    return sum(l)

print([a(n) for n in range(1, 101)])  # Indranil Ghosh, Apr 14 2017

CROSSREFS

Apart from initial term, exactly the same as A049074. - Alonso del Arte, Apr 10 2009

Cf. A006370.

Sequence in context: A049524 A270748 A322363 * A334421 A094045 A033494

Adjacent sequences:  A033490 A033491 A033492 * A033494 A033495 A033496

KEYWORD

nonn

AUTHOR

Jeff Burch

EXTENSIONS

Corrected a(16) to 31 to match other powers of 2; removed duplicate value of a(48) = 139 because a(49) = 806 and not 139. - Alonso del Arte, Apr 10 2009

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 February 25 09:57 EST 2021. Contains 341606 sequences. (Running on oeis4.)