login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006878 Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A006877.
(Formerly M4335)
10
0, 1, 7, 8, 16, 19, 20, 23, 111, 112, 115, 118, 121, 124, 127, 130, 143, 144, 170, 178, 181, 182, 208, 216, 237, 261, 267, 275, 278, 281, 307, 310, 323, 339, 350, 353, 374, 382, 385, 442, 448, 469, 508, 524, 527, 530, 556, 559, 562, 583, 596, 612, 664, 685, 688, 691, 704 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Both the 3x+1 steps and the halving steps are counted.

REFERENCES

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

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

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n=1..130 (from Eric Roosendaal's data)

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

J. C. Lagarias, The 3x+1 problem and its generalizations, Amer. Math. Monthly, 92 (1985), 3-23.

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

Eric Roosendaal, 3x+1 Delay Records

Robert G. Wilson v, Letter to N. J. A. Sloane with attachments, Jan. 1989

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

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

MAPLE

f := 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; fi; L := L+1; od: RETURN(L); end;

MATHEMATICA

numberOfSteps[x0_] := Block[{x = x0, nos = 0}, While[x != 1, If[Mod[x, 2] == 0, x = x/2, x = 3*x+1]; nos++]; nos]; A006878 = numberOfSteps /@ A006877 (* Jean-François Alcover, Feb 22 2012 *)

DeleteDuplicates[Table[Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]], {n, 0, 10^6}], GreaterEqual]-1 (* The program generates the first 44 terms of the sequence, derived from all starting values from 1 up to and including 1 million. *) (* Harvey P. Dale, Nov 26 2022 *)

CROSSREFS

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

Sequence in context: A099534 A318613 A127933 * A022312 A351087 A055661

Adjacent sequences: A006875 A006876 A006877 * A006879 A006880 A006881

KEYWORD

nonn,nice,changed

AUTHOR

N. J. A. Sloane, Robert Munafo

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 December 5 10:23 EST 2022. Contains 358586 sequences. (Running on oeis4.)