cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 29 results. Next

A006878 Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A006877.

Original entry on oeis.org

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

Views

Author

Keywords

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).

Crossrefs

Programs

  • 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 *)

A033492 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).

Original entry on oeis.org

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

Views

Author

Keywords

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.

Extensions

Corrected and extended by Lee Corbin (lcorbin(AT)tsoft.com)
More terms from Larry Reeves (larryr(AT)acm.org), Apr 27 2001

A006881 Squarefree semiprimes: Numbers that are the product of two distinct primes.

Original entry on oeis.org

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

Views

Author

Keywords

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)

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.

Programs

  • 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
    
  • Magma
    [n: n in [1..210] | EulerPhi(n) + DivisorSigma(1,n) eq 2*(n+1)]; // Vincenzo Librandi, Sep 17 2015
    
  • 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 *)
  • 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
    
  • 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
  • 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
    

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

Extensions

Name expanded (based on a comment of Rick L. Shepherd) by Charles R Greathouse IV, Sep 16 2015

A006882 Double factorials n!!: a(n) = n*a(n-2) for n > 1, a(0) = a(1) = 1.

Original entry on oeis.org

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

Views

Author

Keywords

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

Examples

			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 + ...
		

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).

Crossrefs

Bisections are A000165 and A001147. These two entries have more information.
A diagonal of A202212.

Programs

  • Haskell
    a006882 n = a006882_list !! n
    a006882_list = 1 : 1 : zipWith (*) [2..] a006882_list
    -- Reinhard Zumkeller, Oct 23 2014
    
  • Magma
    DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n): n in [0..28] ]; // Klaus Brockhaus, Jan 23 2011
    
  • 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 *)
  • 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 */
    
  • Python
    from sympy import factorial2
    def A006882(n): return factorial2(n) # Chai Wah Wu, Apr 03 2021

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

A347270 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.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 25 2021

Keywords

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.

Examples

			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, ...
...
		

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).

Programs

  • 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 *)

A006884 In the '3x+1' problem, these values for the starting value set new records for highest point of trajectory before reaching 1.

Original entry on oeis.org

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

Views

Author

Keywords

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).

Crossrefs

A060409 gives associated "dropping times", A060410 the maximal values and A060411 the steps at which the maxima occur.

Programs

  • 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
    
  • 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 *)
  • 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

A006885 Record highest point of trajectory before reaching 1 in '3x+1' problem, corresponding to starting values in A006884.

Original entry on oeis.org

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

Views

Author

Keywords

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).

Crossrefs

Programs

  • Haskell
    a006885 = a025586 . a006884  -- Reinhard Zumkeller, May 11 2013
  • 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 *)

A261690 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.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Aug 28 2015

Keywords

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.

Crossrefs

A033958 In the '3x+1' problem, these values for the starting value set new records for number of steps to reach 1.

Original entry on oeis.org

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

Views

Author

Keywords

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.

Crossrefs

Programs

  • Haskell
    a033958 n = a033958_list !! (n-1)
    -- For definition of a033958_list: see A033959.
    -- Reinhard Zumkeller, Jan 08 2014
  • 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 *)

Formula

Positions of records in A006667. - Sean A. Irvine, Jul 22 2020

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

A033959 Record number of steps to reach 1 in '3x+1' problem, corresponding to starting values in A033958.

Original entry on oeis.org

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

Views

Author

Keywords

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.

Crossrefs

Programs

  • 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
  • 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 ] ] ] ]

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
Showing 1-10 of 29 results. Next