login
Search: a033492 -id:a033492
     Sort: relevance | references | number | modified | created      Format: long | short | data
In the '3x+1' problem, these values for the starting value set new records for number of steps to reach 1.
(Formerly M0748)
+10
30
1, 2, 3, 6, 7, 9, 18, 25, 27, 54, 73, 97, 129, 171, 231, 313, 327, 649, 703, 871, 1161, 2223, 2463, 2919, 3711, 6171, 10971, 13255, 17647, 23529, 26623, 34239, 35655, 52527, 77031, 106239, 142587, 156159, 216367, 230631, 410011, 511935, 626331, 837799
OFFSET
1,2
COMMENTS
Both the 3x+1 steps and the halving steps are counted.
This sequence without a(2) = 2 specifies where records occur in A208981. - Omar E. Pol, Apr 14 2022
REFERENCES
D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Random House, 1980, p. 400.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..148 (from Eric Rosendaal's 3x+1 Delay Records, terms 1..130 from T. D. Noe)
David Barina, Convergence verification of the Collatz problem, The Journal of Supercomputing 77(3) (2021), 2681-2688.
David Barina, Computational Verification of the Collatz Problem, preprint on Research Square (2024).
Gaston H. Gonnet, Computations on the 3n+1 conjecture, Maple Technical Newsletter 6 (1991): 18-22.
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
Olivier Rozier and Claude Terracol, Paradoxical behavior in Collatz sequences, arXiv:2502.00948 [math.GM], 2025. See p. 15.
MAPLE
A006877 := 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]; a[1] = 1; a[n_] := a[n] = Block[{x = a[n-1] + 1}, record = numberOfSteps[x - 1]; While[ numberOfSteps[x] <= record, x++]; x]; A006877 = Table[ Print[a[n]]; a[n], {n, 1, 44}](* Jean-François Alcover, Feb 14 2012 *)
DeleteDuplicates[Table[{n, Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]]}, {n, 838000}], GreaterEqual[#1[[2]], #2[[2]]]&][[All, 1]] (* Harvey P. Dale, May 13 2022 *)
PROG
(PARI) A006577(n)=my(s); while(n>1, n=if(n%2, 3*n+1, n/2); s++); s
step(n, r)=my(t); forstep(k=bitor(n, 1), 2*n, 2, t=A006577(k); if(t>r, return([k, t]))); [2*n, r+1]
r=0; print1(n=1); for(i=1, 100, [n, r]=step(n, r); print1(", "n)) \\ Charles R Greathouse IV, Apr 01 2013
(Python)
c1 = lambda x: (3*x+1 if (x%2) else x>>1)
r = -1
for n in range(1, 10**5):
a=0 ; n1=n
while n>1: n=c1(n); a+=1;
if a > r: print(n1, end = ', '); r=a
print('...') # Ya-Ping Lu and Robert Munafo, Mar 22 2024
KEYWORD
nonn,nice
STATUS
approved
In the '3x+1' problem, these values for the starting value set new records for highest point of trajectory before reaching 1.
(Formerly M0843)
+10
25
1, 2, 3, 7, 15, 27, 255, 447, 639, 703, 1819, 4255, 4591, 9663, 20895, 26623, 31911, 60975, 77671, 113383, 138367, 159487, 270271, 665215, 704511, 1042431, 1212415, 1441407, 1875711, 1988859, 2643183, 2684647, 3041127, 3873535, 4637979, 5656191
OFFSET
1,2
COMMENTS
Both the 3x+1 steps and the halving steps are counted.
Where records occur in A025586: A006885(n) = A025586(a(n)) and A025586(m) < A006885(n) for m < a(n). - Reinhard Zumkeller, May 11 2013
REFERENCES
R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 96.
D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Random House, 1980, p. 400.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
David Barina, Table of n, a(n) for n = 1..98 (terms 1..84 from T. D. Noe, terms 85..89 from N. J. A. Sloane).
David Barina, Path records.
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 problems, Computers and Mathematics with Applications, 24 (1992), 79-99.
G. T. Leavens and M. Vermeulen, 3x+1 search programs, Computers and Mathematics with Applications, 24 (1992), 79-99. (Annotated scanned copy)
Tomás Oliveira e Silva, Tables (gives many more terms).
Eric Roosendaal, 3x+1 Path Records.
Olivier Rozier and Claude Terracol, Paradoxical behavior in Collatz sequences, arXiv:2502.00948 [math.GM], 2025. See p. 15.
MATHEMATICA
mcoll[n_]:=Max@@NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]; t={1, max=2}; Do[If[(y=mcoll[n])>max, max=y; AppendTo[t, n]], {n, 3, 705000, 4}]; t (* Jayanta Basu, May 28 2013 *)
DeleteDuplicates[Parallelize[Table[{n, Max[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]]}, {n, 57*10^5}]], GreaterEqual[#1[[2]], #2[[2]]]&][[;; , 1]] (* Harvey P. Dale, Apr 23 2023 *)
PROG
(Haskell)
a006884 n = a006884_list !! (n-1)
a006884_list = f 1 0 a025586_list where
f i r (x:xs) = if x > r then i : f (i + 1) x xs else f (i + 1) r xs
-- Reinhard Zumkeller, May 11 2013
(PARI) A025586(n)=my(r=n); while(n>2, if(n%2, n=3*n+1; if(n>r, r=n)); n>>=1); r
r=0; for(n=1, 1e6, t=A025586(n); if(t>r, r=t; print1(n", "))) \\ Charles R Greathouse IV, May 25 2016
CROSSREFS
A060409 gives associated "dropping times", A060410 the maximal values and A060411 the steps at which the maxima occur.
KEYWORD
nonn,nice
STATUS
approved
Record highest point of trajectory before reaching 1 in '3x+1' problem, corresponding to starting values in A006884.
(Formerly M2086)
+10
14
1, 2, 16, 52, 160, 9232, 13120, 39364, 41524, 250504, 1276936, 6810136, 8153620, 27114424, 50143264, 106358020, 121012864, 593279152, 1570824736, 2482111348, 2798323360, 17202377752, 24648077896, 52483285312, 56991483520, 90239155648, 139646736808
OFFSET
1,2
COMMENTS
Both the 3x+1 steps and the halving steps are counted.
Record values in A025586: a(n) = A025586(A006884(n)) and A025586(m) < a(n) for m < A006884(n). - Reinhard Zumkeller, May 11 2013
In an email of Aug 06 2023, Guy Chouraqui observes that the digital root of a(n) appears to be 7 for all n > 2. - N. J. A. Sloane, Aug 11 2023
REFERENCES
R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 96.
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
Hugo Pfoertner, Table of n, a(n) for n = 1..97, using data from Eric Rosendaal's 3x+1 Path records (terms 1..84 from T. D. Noe)
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 Path Records
MATHEMATICA
mcoll[n_]:=Max@@NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>=n&]; t={1, max=2}; Do[If[(y=mcoll[n])>max, AppendTo[t, max=y]], {n, 3, 10^6, 4}]; t (* Jayanta Basu, May 28 2013 *)
PROG
(Haskell)
a006885 = a025586 . a006884 -- Reinhard Zumkeller, May 11 2013
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
STATUS
approved
Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A006877.
(Formerly M4335)
+10
11
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
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
Hugo Pfoertner, Table of n, a(n) for n = 1..148 (from Eric Rosendaal's 3x+1 Delay Records, terms 1..130 from T. D. Noe)
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
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 *)
KEYWORD
nonn,nice
STATUS
approved
In the '3x+1' problem, these values for the starting value set new records for number of steps to reach 1.
+10
5
1, 3, 7, 9, 25, 27, 73, 97, 129, 171, 231, 313, 327, 703, 871, 1161, 2463, 2919, 3711, 6171, 10971, 13255, 17647, 23529, 26623, 34239, 35655, 52527, 77031, 106239, 142587, 156159, 216367, 230631, 410011, 511935, 626331, 837799, 1117065, 1501353, 1723519, 2298025, 3064033
OFFSET
1,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.
G. T. Leavens and M. Vermeulen, 3x+1 search problems, Computers and Mathematics with Applications, 24 (1992), 79-99.
FORMULA
Positions of records in A006667. - Sean A. Irvine, Jul 22 2020
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 ] ] ] ] (* Winston C. Yang (winston(AT)cs.wisc.edu), Aug 27 2000 *)
PROG
(Haskell)
a033958 n = a033958_list !! (n-1)
-- For definition of a033958_list: see A033959.
-- Reinhard Zumkeller, Jan 08 2014
KEYWORD
nonn,nice
EXTENSIONS
More terms from Jud McCranie, Jan 26 2000
Corrected with Mathematica code by Winston C. Yang (winston(AT)cs.wisc.edu), Aug 27 2000
a(40)-a(43) from Charles R Greathouse IV, Oct 07 2013
STATUS
approved
Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A033958.
+10
4
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
OFFSET
1,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.
G. T. Leavens and M. Vermeulen, 3x+1 search problems, Computers and Mathematics with Applications, 24 (1992), 79-99.
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 ] ] ] ]
PROG
(Haskell)
a033959 n = a033959_list !! (n-1)
(a033959_list, a033958_list) = unzip $ (0, 1) : f 1 1 where
f i x | y > x = (y, 2 * i - 1) : f (i + 1) y
| otherwise = f (i + 1) x
where y = a075680 i
-- Reinhard Zumkeller, Jan 08 2014
CROSSREFS
KEYWORD
nonn,nice
EXTENSIONS
More terms from Winston C. Yang (winston(AT)cs.wisc.edu), Aug 27 2000
More terms from Larry Reeves (larryr(AT)acm.org), Sep 27 2000
Offset corrected by Reinhard Zumkeller, Jan 08 2014
STATUS
approved
Maximal number of halving and tripling steps to reach 1 in '3x+1' problem for range (1, ..., n).
+10
0
1, 2, 8, 8, 8, 9, 17, 17, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 24, 24, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 113, 113, 113, 113, 113
OFFSET
1,2
MATHEMATICA
nst[n_]:=Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>1&]]; nn=60; With[ {stps= Array[nst, nn]}, Table[Max[Take[stps, n]], {n, nn}]] (* Harvey P. Dale, Apr 17 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benjamin Frost (benjamin.frost(AT)students.adelaide.edu.au), Sep 02 2008
EXTENSIONS
Corrected and extended by Harvey P. Dale, Apr 17 2014
STATUS
approved
Inputs n that yield a record-breaking value of A008908(n)/(log_2(n)+1) for the Collatz conjecture.
+10
0
1, 3, 7, 9, 27, 26623, 35655, 52527, 142587, 156159, 230631, 626331, 837799, 1723519, 3542887, 3732423, 5649499, 6649279, 8400511, 63728127, 3743559068799, 100759293214567, 104899295810901231
OFFSET
1,2
COMMENTS
The metric A008908(n)/(log_2(n)+1) is always equal to 1 for any power of 2 (where 1 is the smallest possible value).
EXAMPLE
a(1) = 1, which is trivial, because the first element in any sequence is record setting.
a(5) = 27, because A008908(n)/(log_2(n)+1) yields a maximum value at n=27 among the first 27 elements, and there are 4 record-breaking elements beforehand.
PROG
(Python)
import math
oeis_A006877 = [1, 2, 3, 6, 7, 9, 18, 25, 27, 54, 73, 97, 129, 171, 231, 313, 327, 649, 703, 871, 1161, 2223, 2463, 2919, 3711, 6171, 10971, 13255, 17647, 23529, 26623, 34239, 35655, 52527, 77031, 10623, 142587, 156159, 216367, 230631, 410011, 511935, 626331, 837799, 1117065, 1501353, 1723519, 2298025, 3064033, 3542887, 3732423, 5649499, 6649279, 8400511, 11200681, 14934241, 15733191, 31466382, 36791535, 63728127]
def stopping_time(n):
time = 1
while n>1:
n = 3*n + 1 if n & 1 else n//2
time += 1
return time
def stopping_time_metric(n):
time = stopping_time(n)
logarithmic_distance = (math.log(n, 2)+1)
return float(time/logarithmic_distance)
result = []
record_input = oeis_A006877[0]
record_stopping_time_metric = stopping_time_metric(record_input)
result.append(record_input)
for n in range(1, len(oeis_A006877)):
current_input = oeis_A006877[n]
current_stopping_time_metric = stopping_time_metric(current_input)
if current_stopping_time_metric > record_stopping_time_metric:
record_input = current_input
record_stopping_time_metric = current_stopping_time_metric
result.append(record_input)
for n in range(len(result)):
print(result[n], end=", ")
CROSSREFS
KEYWORD
nonn,more
AUTHOR
STATUS
approved

Search completed in 0.014 seconds