cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A033493 Sum of the numbers in the trajectory of n for the 3x+1 problem.

This page as a plain text file.
%I A033493 #78 Jul 16 2025 01:12:36
%S A033493 1,3,49,7,36,55,288,15,339,46,259,67,119,302,694,31,214,357,519,66,
%T A033493 148,281,633,91,658,145,101440,330,442,724,101104,63,841,248,540,393,
%U A033493 535,557,2344,106,101331,190,1338,325,497,679,100979,139,806,708,1130,197
%N A033493 Sum of the numbers in the trajectory of n for the 3x+1 problem.
%C A033493 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
%C A033493 Conjecture: a(n) = A006577(n)^2 only at a(3) = 49. Verified for n <= 10^7. - _Luca Santarsiero_, Jul 13 2025
%H A033493 Reinhard Zumkeller, <a href="/A033493/b033493.txt">Table of n, a(n) for n = 1..10000</a>
%H A033493 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a>
%H A033493 Wikipedia, <a href="http://en.wikipedia.org/wiki/Collatz_conjecture">Collatz conjecture</a>
%H A033493 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A033493 a(n) = Sum_{k=1..A006577(n)} A070165(k). - _Reinhard Zumkeller_, Oct 08 2011
%e A033493 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
%p A033493 a:= proc(n) option remember; n+`if`(n=1, 0,
%p A033493       a(`if`(n::even, n/2, 3*n+1)))
%p A033493     end:
%p A033493 seq(a(n), n=1..55);  # _Alois P. Heinz_, Jan 29 2021
%t A033493 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 *)
%o A033493 (Haskell)
%o A033493 a033493 = sum . a070165_row  -- _Reinhard Zumkeller_, Oct 08 2011
%o A033493 (Python)
%o A033493 def a(n):
%o A033493     if n==1: return 1
%o A033493     l=[n, ]
%o A033493     while True:
%o A033493         if n%2==0: n//=2
%o A033493         else: n = 3*n + 1
%o A033493         l+=[n, ]
%o A033493         if n<2: break
%o A033493     return sum(l)
%o A033493 print([a(n) for n in range(1, 101)])  # _Indranil Ghosh_, Apr 14 2017
%Y A033493 Apart from initial term, exactly the same as A049074.
%Y A033493 Cf. A006370, A006577, A070165.
%K A033493 nonn,look
%O A033493 1,2
%A A033493 _Jeff Burch_
%E A033493 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