login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033959 Record number of steps to reach 1 in `3x+1' problem, corresponding to starting values in A033958. 3
0, 2, 5, 6, 7, 41, 42, 43, 44, 45, 46, 47, 52, 62, 65, 66, 76, 79, 87, 96, 98, 101, 102, 103, 113, 114, 119, 125, 129, 130, 138, 141, 142, 164, 166, 174, 189, 195, 196, 197, 207, 208, 209, 217, 222, 228, 248, 256, 257, 258, 263, 278, 357, 358, 359, 362, 370 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

Only the 3x+1 steps not the halving steps are counted.

REFERENCES

D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Random House, 1980, p. 400.

B. Hayes, Computer Recreations: On the ups and downs of hailstone numbers, Scientific American, 250 (No. 1, 1984), pp. 10-16.

G. T. Leavens and M. Vermeulen, 3x+1 search problems, Computers and Mathematics with Applications, 24 (1992), 79-99.

LINKS

Index entries for sequences from "Goedel, Escher, Bach"

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

MAPLE

A033959 := proc(n) local a, L; L := 0; a := n; while a <> 1 do if a mod 2 = 0 then a := a/2; else a := 3*a+1; L := L+1; fi; od: RETURN(L); end;

MATHEMATICA

f[ nn_ ] := Module[ {c, n}, c = 0; n = nn; While[ n != 1, If[ Mod[ n, 2 ] == 0, n /= 2, n = 3*n + 1; c++ ] ]; Return[ c ] ] maxx = -1; For[ n = 1, n <= 10^8, n++, Module[ {val}, val = f[ n ]; If[ val > maxx, maxx = val; Print[ n, " ", val ] ] ] ]

CROSSREFS

Cf. A006884, A006885, A006877, A006878, A033492, A033958.

Sequence in context: A117548 A175135 A014489 * A167455 A159752 A126971

Adjacent sequences:  A033956 A033957 A033958 * A033960 A033961 A033962

KEYWORD

nonn,nice

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

More terms from Winston C. Yang (winston(AT)cs.wisc.edu), Aug 27 2000 and from Larry Reeves (larryr(AT)acm.org), Sep 27 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 18:05 EST 2012. Contains 205664 sequences.