login
Search: a006877 -id:a006877
     Sort: relevance | references | number | modified | created      Format: long | short | data
Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A006877.
(Formerly M4335)
+20
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
Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A006877 (same as A006878 except here we start counting at 1 instead of 0).
+20
9
1, 2, 8, 9, 17, 20, 21, 24, 112, 113, 116, 119, 122, 125, 128, 131, 144, 145, 171, 179, 182, 183, 209, 217, 238, 262, 268, 276, 279, 282, 308, 311, 324, 340, 351, 354, 375, 383, 386, 443, 449, 470, 509, 525, 528, 531, 557, 560, 563, 584, 597, 613, 665, 686
OFFSET
1,2
COMMENTS
Both the 3x+1 steps and the halving steps are counted.
REFERENCES
R. E. Maeder, Programming in Mathematica, 3rd Edition, Addison-Wesley, pages 251-252.
CROSSREFS
Equal to A006878 + 1. Cf. A006884, A006885, A033492.
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Lee Corbin (lcorbin(AT)tsoft.com)
More terms from Larry Reeves (larryr(AT)acm.org), Apr 27 2001
STATUS
approved
Squarefree semiprimes: Numbers that are the product of two distinct primes.
(Formerly M4082)
+10
478
6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205
OFFSET
1,1
COMMENTS
Numbers k such that phi(k) + sigma(k) = 2*(k+1). - Benoit Cloitre, Mar 02 2002
Numbers k such that tau(k) = omega(k)^omega(k). - Benoit Cloitre, Sep 10 2002 [This comment is false. If k = 900 then tau(k) = omega(k)^omega(k) = 27 but 900 = (2*3*5)^2 is not the product of two distinct primes. - Peter Luschny, Jul 12 2023]
Could also be called 2-almost primes. - Rick L. Shepherd, May 11 2003
From the Goldston et al. reference's abstract: "lim inf [as n approaches infinity] [(a(n+1) - a(n))] <= 26. If an appropriate generalization of the Elliott-Halberstam Conjecture is true, then the above bound can be improved to 6." - Jonathan Vos Post, Jun 20 2005
The maximal number of consecutive integers in this sequence is 3 - there cannot be 4 consecutive integers because one of them would be divisible by 4 and therefore would not be product of distinct primes. There are several examples of 3 consecutive integers in this sequence. The first one is 33 = 3 * 11, 34 = 2 * 17, 35 = 5 * 7; (see A039833). - Matias Saucedo (solomatias(AT)yahoo.com.ar), Mar 15 2008
Number of terms less than or equal to 10^k for k >= 0 is A036351(k). - Robert G. Wilson v, Jun 26 2012
Are these the numbers k whose difference between the sum of proper divisors of k and the arithmetic derivative of k is equal to 1? - Omar E. Pol, Dec 19 2012
Intersection of A001358 and A030513. - Wesley Ivan Hurt, Sep 09 2013
A237114(n) (smallest semiprime k^prime(n)+1) is a term, for n != 2. - Jonathan Sondow, Feb 06 2014
a(n) are the reduced denominators of p_2/p_1 + p_4/p_3, where p_1 != p_2, p_3 != p_4, p_1 != p_3, and the p's are primes. In other words, (p_2*p_3 + p_1*p_4) never shares a common factor with p_1*p_3. - Richard R. Forberg, Mar 04 2015
Conjecture: The sums of two elements of a(n) forms a set that includes all primes greater than or equal to 29 and all integers greater than or equal to 83 (and many below 83). - Richard R. Forberg, Mar 04 2015
The (disjoint) union of this sequence and A001248 is A001358. - Jason Kimberley, Nov 12 2015
A263990 lists the subsequence of a(n) where a(n+1)=1+a(n). - R. J. Mathar, Aug 13 2019
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Zervos, Marie: Sur une classe de nombres composés. Actes du Congrès interbalkanique de mathématiciens 267-268 (1935)
LINKS
D. A. Goldston, S. W. Graham, J. Pimtz and Y. Yildirim, "Small Gaps Between Primes or Almost Primes", arXiv:math/0506067 [math.NT], March 2005.
G. T. Leavens and M. Vermeulen, 3x+1 search programs, Computers and Mathematics with Applications, 24 (1992), 79-99. (Annotated scanned copy)
R. J. Mathar, Series of reciprocal powers of k-almost primes arXiv:0803.0900, table 6 k=2 shows sum 1/a(n)^s.
Eric Weisstein's World of Mathematics, Semiprime
FORMULA
A000005(a(n)^(k-1)) = A000290(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
A109810(a(n)) = 4; A178254(a(n)) = 6. - Reinhard Zumkeller, May 24 2010
A056595(a(n)) = 3. - Reinhard Zumkeller, Aug 15 2011
a(n) = A096916(n) * A070647(n). - Reinhard Zumkeller, Sep 23 2011
A211110(a(n)) = 3. - Reinhard Zumkeller, Apr 02 2012
Sum_{n >= 1} 1/a(n)^s = (1/2)*(P(s)^2 - P(2*s)), where P is Prime Zeta. - Enrique Pérez Herrero, Jun 24 2012
A050326(a(n)) = 2. - Reinhard Zumkeller, May 03 2013
sopf(a(n)) = a(n) - phi(a(n)) + 1 = sigma(a(n)) - a(n) - 1. - Wesley Ivan Hurt, May 18 2013
d(a(n)) = 4. Omega(a(n)) = 2. omega(a(n)) = 2. mu(a(n)) = 1. - Wesley Ivan Hurt, Jun 28 2013
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Aug 22 2013
A089233(a(n)) = 1. - Reinhard Zumkeller, Sep 04 2013
From Peter Luschny, Jul 12 2023: (Start)
For k > 1: k is a term <=> k^A001221(k) = k*A007947(k).
For k > 1: k is a term <=> k^A001222(k) = k*A007947(k).
For k > 1: k is a term <=> A363923(k) = k. (End)
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Jan 13 2025
MAPLE
N:= 1001: # to get all terms < N
Primes:= select(isprime, [2, seq(2*k+1, k=1..floor(N/2))]):
{seq(seq(p*q, q=Primes[1..ListTools:-BinaryPlace(Primes, N/p)]), p=Primes)} minus {seq(p^2, p=Primes)};
# Robert Israel, Jul 23 2014
# Alternative, using A001221:
isA006881 := proc(n)
if numtheory[bigomega](n) =2 and A001221(n) = 2 then
true ;
else
false ;
end if;
end proc:
A006881 := proc(n) if n = 1 then 6; else for a from procname(n-1)+1 do if isA006881(a) then return a; end if; end do: end if;
end proc: # R. J. Mathar, May 02 2010
# Alternative:
with(NumberTheory): isA006881 := n -> is(NumberOfPrimeFactors(n, 'distinct') = 2 and NumberOfPrimeFactors(n) = 2):
select(isA006881, [seq(1..205)]); # Peter Luschny, Jul 12 2023
MATHEMATICA
mx = 205; Sort@ Flatten@ Table[ Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[ mx/Prime[n]]}] (* Robert G. Wilson v, Dec 28 2005, modified Jul 23 2014 *)
sqFrSemiPrimeQ[n_] := Last@# & /@ FactorInteger@ n == {1, 1}; Select[Range[210], sqFrSemiPrimeQ] (* Robert G. Wilson v, Feb 07 2012 *)
With[{upto=250}, Select[Sort[Times@@@Subsets[Prime[Range[upto/2]], {2}]], #<=upto&]] (* Harvey P. Dale, Apr 30 2018 *)
PROG
(PARI) for(n=1, 214, if(bigomega(n)==2&&omega(n)==2, print1(n, ", ")))
(PARI) for(n=1, 214, if(bigomega(n)==2&&issquarefree(n), print1(n, ", ")))
(PARI) list(lim)=my(v=List()); forprime(p=2, sqrt(lim), forprime(q=p+1, lim\p, listput(v, p*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
(Haskell)
a006881 n = a006881_list !! (n-1)
a006881_list = filter chi [1..] where
chi n = p /= q && a010051 q == 1 where
p = a020639 n
q = n `div` p
-- Reinhard Zumkeller, Aug 07 2011
(Sage)
def A006881_list(n) :
R = []
for i in (6..n) :
d = prime_divisors(i)
if len(d) == 2 :
if d[0]*d[1] == i :
R.append(i)
return R
A006881_list(205) # Peter Luschny, Feb 07 2012
(Magma) [n: n in [1..210] | EulerPhi(n) + DivisorSigma(1, n) eq 2*(n+1)]; // Vincenzo Librandi, Sep 17 2015
(Python)
from sympy import factorint
def ok(n): f=factorint(n); return len(f) == 2 and sum(f[p] for p in f) == 2
print(list(filter(ok, range(1, 206)))) # Michael S. Branicky, Jun 10 2021
(Python)
from math import isqrt
from sympy import primepi, primerange
def A006881(n):
def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 15 2024
CROSSREFS
Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A030229, A051709, A001221 (omega(n)), A001222 (bigomega(n)), A001358 (semiprimes), A005117 (squarefree), A007304 (squarefree 3-almost primes), A213952, A039833, A016105 (subsequences), A237114 (subsequence, n != 2).
Subsequence of A007422.
Cf. A259758 (subsequence), A036351, A363923.
KEYWORD
nonn,easy,nice,changed
EXTENSIONS
Name expanded (based on a comment of Rick L. Shepherd) by Charles R Greathouse IV, Sep 16 2015
STATUS
approved
Double factorials n!!: a(n) = n*a(n-2) for n > 1, a(0) = a(1) = 1.
(Formerly M0876)
+10
258
1, 1, 2, 3, 8, 15, 48, 105, 384, 945, 3840, 10395, 46080, 135135, 645120, 2027025, 10321920, 34459425, 185794560, 654729075, 3715891200, 13749310575, 81749606400, 316234143225, 1961990553600, 7905853580625, 51011754393600, 213458046676875, 1428329123020800
OFFSET
0,3
COMMENTS
Product of pairs of successive terms gives factorials in increasing order. - Amarnath Murthy, Oct 17 2002
a(n) = number of down-up permutations on [n+1] for which the entries in the even positions are increasing. For example, a(3)=3 counts 2143, 3142, 4132. Also, a(n) = number of down-up permutations on [n+2] for which the entries in the odd positions are decreasing. For example, a(3)=3 counts 51423, 52413, 53412. - David Callan, Nov 29 2007
The double factorial of a positive integer n is the product of the positive integers <= n that have the same parity as n. - Peter Luschny, Jun 23 2011
For n even, a(n) is the number of ways to place n points on an n X n grid with pairwise distinct abscissa, pairwise distinct ordinate, and 180-degree rotational symmetry. For n odd, the number of ways is a(n-1) because the center point can be considered "fixed". For 90-degree rotational symmetry cf. A001813, for mirror symmetry see A000085, A135401, and A297708. - Manfred Scheucher, Dec 29 2017
Could be extended to include a(-1) = 1. But a(-2) is not defined, otherwise we would have 1 = a(0) = 0*a(-2). - Jianing Song, Oct 23 2019
REFERENCES
Putnam Contest, 4 Dec. 2004, Problem A3.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..806 (terms 0..100 from T. D. Noe)
Christian Aebi and Grant Cairns, Generalizations of Wilson's Theorem for Double-, Hyper-, Sub-and Superfactorials, The American Mathematical Monthly 122.5 (2015): 433-443.
CombOS - Combinatorial Object Server, Generate colored permutations
Joseph E. Cooper III, A recurrence for an expression involving double factorials, arXiv:1510.00399 [math.CO], 2015.
Gary T. Leavens and Mike Vermeulen, 3x+1 search programs, Computers and Mathematics with Applications, 24 (1992), 79-99. (Annotated scanned copy)
Peter Luschny, Multifactorials
B. E. Meserve, Double Factorials, American Mathematical Monthly, 55 (1948), 425-426.
Rudolph Ondrejka, Tables of double factorials, Math. Comp., Vol. 24, No. 109 (1970), p. 231.
Eric Weisstein's World of Mathematics, Double Factorial.
Eric Weisstein's World of Mathematics, Multifactorial.
FORMULA
a(n) = Product_{i=0..floor((n-1)/2)} (n - 2*i).
E.g.f.: 1+exp(x^2/2)*x*(1+sqrt(Pi/2)*erf(x/sqrt(2))). - Wouter Meeussen, Mar 08 2001
Satisfies a(n+3)*a(n) - a(n+1)*a(n+2) = (n+1)!. [Putnam Contest]
a(n) = n!/a(n-1). - Vaclav Kotesovec, Sep 17 2012
a(n) * a(n+3) = a(n+1) * (a(n+2) + a(n)). a(n) * a(n+1) = (n+1)!. - Michael Somos, Dec 29 2012
a(n) ~ c * n^((n+1)/2) / exp(n/2), where c = sqrt(Pi) if n is even, and c = sqrt(2) if n is odd. - Vaclav Kotesovec, Nov 08 2014
a(2*n) = 2^n*a(n)*a(n-1). a(2^n) = 2^(2^n - 1) * 1!! * 3!! * 7!! * ... * (2^(n-1) - 1)!!. - Peter Bala, Nov 01 2016
a(n) = 2^h*(2/Pi)^(sin(Pi*h)^2/2)*Gamma(h+1) where h = n/2. This analytical extension supports the view that a(-1) = 1 is a meaningful numerical extension. With this definition (-1/2)!! = Gamma(3/4)/Pi^(1/4). - Peter Luschny, Oct 24 2019
a(n) ~ (n+1/6)*sqrt((2/e)*(n/e)^(n-1)*(Pi/2)^(cos(n*Pi/2)^2)). - Peter Luschny, Oct 25 2019
Sum_{n>=0} 1/a(n) = A143280. - Amiram Eldar, Nov 10 2020
Sum_{n>=0} 1/(a(n)*a(n+1)) = e - 1. - Andrés Ventas, Apr 12 2021
EXAMPLE
G.f. = 1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 15*x^5 + 48*x^6 + 105*x^7 + 384*x^8 + ...
MAPLE
A006882 := proc(n) option remember; if n <= 1 then 1 else n*A006882(n-2); fi; end;
A006882 := proc(n) doublefactorial(n) ; end proc; seq(A006882(n), n=0..10) ; # R. J. Mathar, Oct 20 2009
A006882 := n -> mul(k, k = select(k -> k mod 2 = n mod 2, [$1 .. n])): seq(A006882(n), n = 0 .. 10); # Peter Luschny, Jun 23 2011
A006882 := proc(n) if n=0 then 1 else mul(n-2*k, k=0..floor(n/2)-1); fi; end; # N. J. A. Sloane, May 27 2016
MATHEMATICA
Array[ #!!&, 40, 0 ]
multiFactorial[n_, k_] := If[n < 1, 1, If[n < k + 1, n, n*multiFactorial[n - k, k]]]; Array[ multiFactorial[#, 2] &, 27, 0] (* Robert G. Wilson v, Apr 23 2011 *)
PROG
(PARI) {a(n) = prod(i=0, (n-1)\2, n - 2*i )} \\ Improved by M. F. Hasler, Nov 30 2013
(PARI) {a(n) = if( n<2, n>=0, n * a(n-2))}; /* Michael Somos, Apr 06 2003 */
(PARI) {a(n) = if( n<0, 0, my(E); E = exp(x^2 / 2 + x * O(x^n)); n! * polcoeff( 1 + E * x * (1 + intformal(1 / E)), n))}; /* Michael Somos, Apr 06 2003 */
(Magma) DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n): n in [0..28] ]; // Klaus Brockhaus, Jan 23 2011
(Haskell)
a006882 n = a006882_list !! n
a006882_list = 1 : 1 : zipWith (*) [2..] a006882_list
-- Reinhard Zumkeller, Oct 23 2014
(Python)
from sympy import factorial2
def A006882(n): return factorial2(n) # Chai Wah Wu, Apr 03 2021
CROSSREFS
Bisections are A000165 and A001147. These two entries have more information.
A diagonal of A202212.
KEYWORD
nonn,easy,core,nice,changed
AUTHOR
STATUS
approved
Square array T(n,k) in which row n lists the 3x+1 sequence starting at n, read by antidiagonals upwards, with n >= 1 and k >= 0.
+10
51
1, 2, 4, 3, 1, 2, 4, 10, 4, 1, 5, 2, 5, 2, 4, 6, 16, 1, 16, 1, 2, 7, 3, 8, 4, 8, 4, 1, 8, 22, 10, 4, 2, 4, 2, 4, 9, 4, 11, 5, 2, 1, 2, 1, 2, 10, 28, 2, 34, 16, 1, 4, 1, 4, 1, 11, 5, 14, 1, 17, 8, 4, 2, 4, 2, 4, 12, 34, 16, 7, 4, 52, 4, 2, 1, 2, 1, 2, 13, 6, 17, 8, 22
OFFSET
1,2
COMMENTS
This array gives all 3x+1 sequences.
The 3x+1 or Collatz problem is described in A006370.
Column k gives the image of n at the k-th step.
This infinite square array contains the irregular triangles A070165, A235795 and A347271.
For a piping diagram of the 3x+1 problem see A235800.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..11325 (antidiagonals 1..150 of the array, flattened)
J. C. Lagarias, The 3x+1 Problem: An Overview, arXiv:2111.02635 [math.NT], 2021.
EXAMPLE
The corner of the square array begins:
1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, ...
2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, ...
3,10, 5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, ...
4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, ...
5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, ...
6, 3,10, 5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, ...
7,22,11,34,17,52,26,13,40,20,10, 5,16, 8, 4, 2, 1, 4, 2, 1, ...
8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, ...
9,28,14, 7,22,11,34,17,52,26,13,40,20,10, 5,16, 8, 4, 2, 1, ...
10, 5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, ...
11,34,17,52,26,13,40,20,10, 5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, ...
12, 6, 3,10, 5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, ...
13,40,20,10, 5,16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, ...
14, 7,22,11,34,17,52,26,13,40,20,10, 5,16, 8, 4, 2, 1, 4, 2, ...
...
MAPLE
T:= proc(n, k) option remember; `if`(k=0, n, (j->
`if`(j::even, j/2, 3*j+1))(T(n, k-1)))
end:
seq(seq(T(d-k, k), k=0..d-1), d=1..20); # Alois P. Heinz, Aug 25 2021
MATHEMATICA
T[n_, k_] := T[n, k] = If[k == 0, n, Function[j,
If[EvenQ[j], j/2, 3*j + 1]][T[n, k - 1]]];
Table[Table[T[d - k, k], {k, 0, d - 1}], {d, 1, 20}] // Flatten (* Jean-François Alcover, Mar 02 2022, after Alois P. Heinz *)
CROSSREFS
Main diagonal gives A347272.
Parity of this sequence is A347283.
Largest value in row n gives A056959.
Number of nonpowers of 2 in row n gives A208981.
Some rows n are: A153727 (n=1), A033478 (n=3), A033479 (n=9), A033480 (n=15), A033481 (n=21), A008884 (n=27), A008880 (n=33), A008878 (n=39), A008883 (n=51), A008877 (n=57), A008874 (n=63), A258056 (n=75), A258098 (n=79), A008876 (n=81), A008879 (n=87), A008875 (n=95), A008873 (n=97), A008882 (n=99), A245671 (n=1729).
First four columns k are: A000027 (k=0), A006370 (k=1), A075884 (k=2), A076536 (k=3).
KEYWORD
nonn,tabl
AUTHOR
Omar E. Pol, Aug 25 2021
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
a(1) = 1; for n>1, a(n) is the smallest number not already present which is entailed by the rules (i) k present => 3*k+1 present; (ii) 2*k present => k present.
+10
6
1, 4, 2, 7, 13, 22, 11, 34, 17, 40, 20, 10, 5, 16, 8, 25, 31, 49, 52, 26, 61, 67, 76, 38, 19, 58, 29, 79, 88, 44, 94, 47, 103, 115, 121, 133, 142, 71, 148, 74, 37, 112, 56, 28, 14, 43, 85, 130, 65, 157, 169, 175, 184, 92, 46, 23, 70, 35, 106, 53, 139, 160, 80
OFFSET
1,2
COMMENTS
An analog of A109732 such that the statement 'the sequence is a permutation of the positive integers not divisible by 3' is equivalent to the (3*n+1)-conjecture for numbers not divisible by 3.
On Aug 29 2015, Max Alekseyev noted that, while the (3*n+1)-conjecture indeed implies that the sequence is a permutation of the positive integers not divisible by 3, the opposite statement is an open question. The author cannot yet prove this, so his previous comment is only a conjecture.
In connection with this, consider the following conjecture which could be called the (n-1)/3-conjecture. Let n be any number not divisible by 3. If n==1 (mod 3) and (n-1)/3 is not divisible by 3, then set n_1 = (n-1)/3. Otherwise set n_1 = 2*n. Conjecture. There exists an iteration n_m = 1. Does the (n-1)/3-conjecture imply the (3*n+1)-conjecture?
Example: 19->38->76->25->8->16->5->10->20->40->13->4->1.
LINKS
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Aug 28 2015
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

Search completed in 0.023 seconds