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!)
A193688 Number of steps to reach 1 in Collatz (3x+1) problem starting with 2^n - 1. 4
0, 7, 16, 17, 106, 107, 46, 47, 61, 62, 156, 157, 158, 159, 129, 130, 224, 225, 177, 178, 303, 304, 473, 474, 444, 445, 384, 385, 448, 449, 450, 451, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 852 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Arkadiusz Wesolowski, Table of n, a(n) for n = 1..10000

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

Eric Weisstein's World of Mathematics, Collatz Problem

FORMULA

For larger n, a(n) ~ 13.5*n.

MATHEMATICA

Table[Length[NestWhileList[If[OddQ@#, 3 # + 1, #/2] &, 2^n - 1, # > 1 &]] - 1, {n, 60}] (* Arkadiusz Wesolowski, Sep 16 2011 *)

PROG

(Python)

for i in range(1, 100):

n = 2**i - 1

x = n

c = 0

while x != 1:

c = c + 1

if (x & 1) == 0:

x = x//2

else:

x = 3*x + 1

print(c)

# David Rabahy, Sep 18 2017

CROSSREFS

Cf. A006577, A179118 (starting with 2^n+1).

Sequence in context: A070417 A101681 A067776 * A132348 A177763 A101073

Adjacent sequences: A193685 A193686 A193687 * A193689 A193690 A193691

KEYWORD

nonn

AUTHOR

Arkadiusz Wesolowski, Aug 02 2011

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 February 7 07:24 EST 2023. Contains 360112 sequences. (Running on oeis4.)