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 19 results. Next

A126241 Dropping times in the 3n+1 problem (or the Collatz problem). Let T(n):=n/2 if n is even, (3n+1)/2 otherwise (A014682). Let a(n) be the smallest integer k such that T^(k)(n)

Original entry on oeis.org

0, 1, 4, 1, 2, 1, 7, 1, 2, 1, 5, 1, 2, 1, 7, 1, 2, 1, 4, 1, 2, 1, 5, 1, 2, 1, 59, 1, 2, 1, 56, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 5, 1, 2, 1, 54, 1, 2, 1, 4, 1, 2, 1, 5, 1, 2, 1, 7, 1, 2, 1, 54, 1, 2, 1, 4, 1, 2, 1, 51, 1, 2, 1, 5, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 5, 1, 2, 1, 45, 1, 2, 1, 8, 1, 2, 1, 4
Offset: 1

Views

Author

Christof Menzel (christof.menzel(AT)hs-niederrhein.de), Mar 08 2007

Keywords

Comments

Also called "stopping times", although that term is usually reserved for A006666.
From K. Spage, Oct 22 2009, corrected Aug 21 2014: (Start)
Congruency relationship: For n>1 and m>1, all m congruent to n mod 2^(a(n)) have a dropping time equal to a(n).
By refining the definition of the dropping time to "starting with x=n, iterate x until (abs(x) <= abs(n))" the above congruency relationship holds for all nonnegative values of n and all positive or negative values of m including zero.
By this refined definition, a(1)=2 rather than the usual zero set by convention. All other values of positive a(n) remain unchanged. (End)
Terras defines a coefficient stopping time (definition 1.5) tau(n) = d which is the smallest d for which 3^u/2^d < 1 where u is the number of tripling steps among the first d steps starting from n. Clearly tau(n) <= a(n), and Terras conjectures (conjecture 2.9) that tau(n) = a(n) for n>=2. - Olivier Rozier, May 13 2024

Examples

			s(15) = 7, since the trajectory {T^(k)(15)} (k=1,2,3,...) equals 23,35,53,80,40,20,10.
		

References

  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010. See p. 33.

Crossrefs

See A074473, which is the main entry for dropping times.
Records: A060412, A060413.
Cf. A020914 (allowable dropping times). - K. Spage, Aug 22 2014

Programs

  • Mathematica
    Collatz2[n_] := If[n<2, {}, Rest[NestWhileList[If[EvenQ[#], #/2, (3 # + 1)/2] &, n, # >= n &]]]; Table[Length[Collatz2[n]], {n, 1, 1000}]

Formula

a(n) = ceiling(A102419(n)/(1+log(2)/log(3))). - K. Spage, Aug 22 2014

Extensions

Broken link fixed by K. Spage, Oct 22 2009

A060445 "Dropping time" in 3x+1 problem starting at 2n+1 (number of steps to reach a lower number than starting value). Also called glide(2n+1).

Original entry on oeis.org

0, 6, 3, 11, 3, 8, 3, 11, 3, 6, 3, 8, 3, 96, 3, 91, 3, 6, 3, 13, 3, 8, 3, 88, 3, 6, 3, 8, 3, 11, 3, 88, 3, 6, 3, 83, 3, 8, 3, 13, 3, 6, 3, 8, 3, 73, 3, 13, 3, 6, 3, 68, 3, 8, 3, 50, 3, 6, 3, 8, 3, 13, 3, 24, 3, 6, 3, 11, 3, 8, 3, 11, 3, 6, 3, 8, 3, 65, 3, 34, 3, 6, 3, 47, 3, 8, 3, 13, 3, 6, 3, 8, 3
Offset: 0

Views

Author

N. J. A. Sloane, Apr 07 2001

Keywords

Comments

If the starting value is even then of course the next step in the trajectory is smaller (cf. A102419).
The dropping time can be made arbitrarily large: If the starting value is of form n(2^m)-1 and m > 1, the next value is 3n(2^m)-3+1. That divided by 2 is 3n(2^(m-1))-1. It is bigger than the starting value and of the same form - substitute 3n -> n and m-1 -> m, so recursively get an increasing subsequence of m odd values. The dropping time is obviously longer than that. This holds even if Collatz conjecture were refuted. For example, m=5, n=3 -> 95, 286, 143, 430, 215, 646, 323, 970, 485, 1456, 728, 364, 182, 91. So the subsequence in reduced Collatz variant is 95, 143, 215, 323, 485. - Juhani Heino, Jul 21 2017

Examples

			3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2, taking 6 steps, so a(1) = 6.
		

Crossrefs

A060565 gives the first lower number that is reached. Cf. A060412-A060415, A217934.
See A074473, A102419 for other versions of this sequence.
Cf. A122437 (allowable dropping times), A122442 (least k having dropping time A122437(n)).
Cf. A070165.

Programs

  • Haskell
    a060445 0 = 0
    a060445 n = length $ takeWhile (>= n') $ a070165_row n'
                where n' = 2 * n + 1
    -- Reinhard Zumkeller, Mar 11 2013
    
  • Mathematica
    nxt[n_]:=If[OddQ[n],3n+1,n/2]; Join[{0},Table[Length[NestWhileList[nxt, n,#>=n&]]-1, {n,3,191,2}]]  (* Harvey P. Dale, Apr 23 2011 *)
  • Python
    def a(n):
        if n<1: return 0
        n=2*n + 1
        N=n
        x=0
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            x+=1
            if nIndranil Ghosh, Apr 22 2017

Extensions

More terms from Jason Earls, Apr 08 2001 and from Michel ten Voorde Apr 09 2001
Still more terms from Larry Reeves (larryr(AT)acm.org), Apr 12 2001

A075476 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 64n+7. Corresponds to selection of every 16th term from A074474.

Original entry on oeis.org

12, 84, 12, 14, 12, 35, 12, 14, 12, 17, 12, 14, 12, 25, 12, 14, 12, 25, 12, 14, 12, 27, 12, 14, 12, 17, 12, 14, 12, 38, 12, 14, 12, 25, 12, 14, 12, 45, 12, 14, 12, 17, 12, 14, 12, 27, 12, 14, 12, 20, 12, 14, 12, 79, 12, 14, 12, 17, 12, 14, 12, 20, 12, 14, 12, 33, 12, 14, 12
Offset: 0

Views

Author

Labos Elemer, Sep 23 2002

Keywords

Comments

Remark that initial values of form 64m+r, if r={3, 11, 19, 27, 35, 43, 51, 55} provide first-sink-lengths {7, 9, 7, 9, 7, 9, 7, 9} respectively; e.g. {64k+19, 192k+58, 96k+29, 288k+88, 144k+44, 72k+22, 36k+11} submerge first below initial value at the 7th term, 36k+11<64k+19.

Examples

			n=0: 64n+7=7, list={7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5..}, i.e. the 12th term is the first that <12, the initial value.
		

Crossrefs

Programs

  • Mathematica
    lcoll[n_] := Length[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # >= n &]]; Table[lcoll[64*i + 7], {i, 0, 68}] (* Jayanta Basu, Jun 15 2013 *)
  • PARI
    A006370(n) = if(n%2, 3*n+1, n/2);
    A074473(n) = if(1==n,n,my(org_n=n); for(i=1,oo,if(nA006370(n)));
    A075476(n) = A074473((64*n)+7); \\ Antti Karttunen, Oct 09 2018

Formula

a(n) = A074473(64n+7), n=0, ..., 256

Extensions

Typo in formula corrected by Antti Karttunen, Oct 09 2018

A102419 "Dropping time" in 3x+1 problem starting at n (number of steps to reach a lower number than starting value); a(1) = 0 by convention. Also called glide(n).

Original entry on oeis.org

0, 1, 6, 1, 3, 1, 11, 1, 3, 1, 8, 1, 3, 1, 11, 1, 3, 1, 6, 1, 3, 1, 8, 1, 3, 1, 96, 1, 3, 1, 91, 1, 3, 1, 6, 1, 3, 1, 13, 1, 3, 1, 8, 1, 3, 1, 88, 1, 3, 1, 6, 1, 3, 1, 8, 1, 3, 1, 11, 1, 3, 1, 88, 1, 3, 1, 6, 1, 3, 1, 83, 1, 3, 1, 8, 1, 3, 1, 13, 1, 3, 1, 6, 1, 3, 1, 8, 1, 3, 1, 73, 1, 3, 1, 13, 1, 3, 1, 6
Offset: 1

Views

Author

N. J. A. Sloane, Sep 15 2006

Keywords

Examples

			1: 0 steps
2 1: 1 step
3 10 5 16 8 4 2 1: 6 steps (before it drops below n)
4 2 1: 1 step
5 16 8 4 2 1: 3 steps
6 3 ...: 1 step
7 22 11 34 17 52 26 13 40 20 10 5 ...: 11 steps
...
Records: 0.1.6.11.96.132...171... (A217934)
at.......1.2.3..7.27.703.10087... (A060412)
		

Crossrefs

For records see A060412, A217934. - N. J. A. Sloane, Oct 20 2012

Programs

  • Mathematica
    Prepend[Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>=n&]],{n,2,99}],1]-1 (* Jayanta Basu, May 28 2013 *)
  • Python
    def a(n):
        if n<3: return n - 1
        N=n
        x=0
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            x+=1
            if nIndranil Ghosh, Apr 22 2017

Formula

a(2n) = 1; a(2n+1) = A060445(n).
a(n) = A074473(n)-1 for n>1.
a(n) = floor(A126241(n)*(1+log(2)/log(3))). - K. Spage, Oct 22 2009

A074474 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 4n+3.

Original entry on oeis.org

7, 12, 9, 12, 7, 9, 97, 92, 7, 14, 9, 89, 7, 9, 12, 89, 7, 84, 9, 14, 7, 9, 74, 14, 7, 69, 9, 51, 7, 9, 14, 25, 7, 12, 9, 12, 7, 9, 66, 35, 7, 48, 9, 14, 7, 9, 12, 22, 7, 14, 9, 22, 7, 9, 14, 51, 7, 20, 9, 33, 7, 9, 45, 22, 7, 12, 9, 12, 7, 9, 40, 17, 7, 14, 9, 22, 7, 9, 12, 35, 7, 35, 9, 14
Offset: 1

Views

Author

Labos Elemer, Sep 19 2002

Keywords

Examples

			n=6: 4n-1=23, the list={23,70,35,106,53,160,80,40,20, 10,5,16,8,4,2,1} sinks first below iv=23 at 20, the 9th term, so a(6)=9. Observe several (provable) modular rules with respect of initial value: e.g. regular appearance of 9 and 7.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, k, # >= k &]][4 n - 1], {n, 120}] (* Michael De Vlieger, Feb 20 2017 *)

Formula

a(n)=A074473[4n-1]

A075483 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of form 64n+63.

Original entry on oeis.org

89, 25, 22, 22, 35, 20, 66, 30, 17, 38, 133, 27, 25, 40, 35, 30, 20, 25, 22, 38, 38, 133, 51, 27, 17, 40, 22, 30, 20, 35, 22, 95, 131, 33, 20, 25, 27, 22, 27, 66, 17, 27, 71, 45, 33, 48, 35, 89, 22, 33, 30, 30, 48, 22, 40, 30, 17, 61, 30, 64, 22, 22, 25, 84, 22, 22, 25, 33
Offset: 0

Views

Author

Labos Elemer, Sep 24 2002

Keywords

Comments

1stSubmergeLengths[=A074473] with initial values belonging to other residue classes modulo 64 are either listed in A075476-A075483 or can be easily determined. For 64k+2s the first sink below initial value is at 2nd iterate; for 64k+4s+1 the first submerge below initial value comes at 4th term of iteration list; finally if initial value is of 64k+4s+3 form or moreover initial value = 64k+r, r = 3, 11, 19, 23, 35, 43, 51, 55, then for all k first sink emerges at the 7th, 9th, 7th, 9th, 7th, 9th, 7th, 9th iterates, respectively.

Examples

			n=8: 64n + 63 = 575, the list = the 17th term 410 < 575 = initial value, so a(8)=17.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, k, # >= k &]][64 n - 1], {n, 120}] (* Michael De Vlieger, Feb 20 2017 *)

Formula

a(n) = A074473(64n + 63).

A076227 Number of surviving Collatz residues mod 2^n.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 8, 13, 19, 38, 64, 128, 226, 367, 734, 1295, 2114, 4228, 7495, 14990, 27328, 46611, 93222, 168807, 286581, 573162, 1037374, 1762293, 3524586, 6385637, 12771274, 23642078, 41347483, 82694966, 151917636, 263841377, 527682754, 967378591, 1934757182, 3611535862
Offset: 0

Views

Author

Labos Elemer, Oct 01 2002

Keywords

Comments

Number of residue classes in which A074473(m) is not constant.
The ratio of numbers of inhomogenous r-classes versus uniform-classes enumerated here increases with n and tends to 0. For n large enough ratio < a(16)/65536 = 2114/65536 ~ 3.23%.
Theorem: a(n) can be generated for each n > 2 algorithmically in a Pascal's triangle-like manner from the two starting values 0 and 1. This result is based on the fact that the Collatz residues (mod 2^k) can be evolved according to a binary tree. There is a direct connectedness to A100982, A056576, A022921, A020915. - Mike Winkler, Sep 12 2017
Brown's criterion ensures that the sequence is complete (see formulae). - Vladimir M. Zarubin, Aug 11 2019

Examples

			n=6: Modulo 64, eight residue classes were counted: r=7, 15, 27, 31, 39, 47, 59, 63. See A075476-A075483. For other 64-8=56 r-classes u(q)=A074473(64k+q) is constant: in 32 class u(q)=2, in 16 classes u(q)=4, in 4 classes u(q)=7 and in 4 cases u(q)=9. E.g., for r=11, 23, 43, 55 A074473(64k+r)=9 independently of k.
From _Mike Winkler_, Sep 12 2017: (Start)
The next table shows how the theorem works. No entry is equal to zero.
  k =        3  4  5   6   7   8   9  10  11   12 .. | a(n)=
-----------------------------------------------------|
  n =  2  |  1                                       |    1
  n =  3  |  1  1                                    |    2
  n =  4  |     2  1                                 |    3
  n =  5  |        3   1                             |    4
  n =  6  |        3   4   1                         |    8
  n =  7  |            7   5   1                     |   13
  n =  8  |               12   6   1                 |   19
  n =  9  |               12  18   7   1             |   38
  n = 10  |                   30  25   8   1         |   64
  n = 11  |                   30  55  33   9    1    |  128
  :       |                        :   :   :    : .. |   :
-----------------------------------------------------|------
A100982(k) = 2  3  7  12  30  85 173 476 961 2652 .. |
The entries (n,k) in this table are generated by the rule (n+1,k) = (n,k) + (n,k-1). The last value of (n+1,k) is given by n+1 = A056576(k-1), or the highest value in column n is given twice only if A022921(k-2) = 2. Then a(n) is equal to the sum of the entries in row n. For k = 7 there is: 1 = 0 + 1, 5 = 1 + 4, 12 = 5 + 7, 12 = 12 + 0. It is a(9) = 12 + 18 + 7 + 1 = 38. The sum of column k is equal to A100982(k). (End)
		

Crossrefs

Programs

  • C
    /* call as follows: uint64_t s=survives(0,1,1,0,bits); */
    uint64_t survives(uint64_t r, uint64_t m, uint64_t lm, int p2, int fp2)
    {
        while(!(m&1) && (m>=lm)) {
            if(r&1) { r+=(r+1)>>1; m+=m>>1; }
            else { r>>=1; m>>=1; }
        }
        if(mPhil Carmody, Sep 08 2011 */
    
  • PARI
    /* algorithm for the Theorem */
    {limit=30; /*or limit>30*/ R=matrix(limit,limit); R[2,1]=0; R[2,2]=1; for(k=2, limit, if(k>2, print; print1("For n="k-1" in row n: ")); Kappa_k=floor(k*log(3)/log(2)); for(n=k, Kappa_k, R[n+1,k]=R[n,k]+R[n,k-1]); t=floor(1+(k-1)*log(2)/log(3)); a_n=0; for(i=t, k-1, print1(R[k,i]", "); a_n=a_n+R[k,i]); if(k>2, print; print(" and the sum is a(n)="a_n)))} \\ Mike Winkler, Sep 12 2017

Formula

a(n) = Sum_{k=A020915(n+2)..n+1} (n,k). (Theorem, cf. example) - Mike Winkler, Sep 12 2017
From Vladimir M. Zarubin, Aug 11 2019: (Start)
a(0) = 1, a(1) = 1, and for k > 0,
a(A020914(k)) = 2*a(A020914(k)-1) - A100982(k),
a(A054414(k)) = 2*a(A054414(k)-1). (End)
a(n) = 2^n - 2^n*Sum_{k=0..A156301(n)-1} A186009(k+1)/2^A020914(k). - Benjamin Lombardo, Sep 08 2019

Extensions

New terms to n=39 by Phil Carmody, Sep 08 2011

A075482 Number of iteration that first becomes smaller than the initial value if Collatz-function (A006370) is iterated, starting with numbers of the form 64n + 59.

Original entry on oeis.org

12, 14, 12, 45, 12, 14, 12, 17, 12, 14, 12, 33, 12, 14, 12, 20, 12, 14, 12, 25, 12, 14, 12, 17, 12, 14, 12, 20, 12, 14, 12, 30, 12, 14, 12, 25, 12, 14, 12, 17, 12, 14, 12, 30, 12, 14, 12, 22, 12, 14, 12, 69, 12, 14, 12, 17, 12, 14, 12, 22, 12, 14, 12, 22, 12, 14, 12, 82, 12
Offset: 0

Views

Author

Labos Elemer, Sep 24 2002

Keywords

Comments

1stSubmergeLengths[=A074473] with initial values belonging to other residue classes modulo 64 are either listed in A075476-A075483 or can be easily determined. For 64k+2s the first sink below initial value is at 2nd iterate; for 64k+4s+1 the first submerge below initial value comes at 4th term of iteration list; finally if initial value is of 64k+4s+3 form or moreover initial value = 64k+r, r = 3, 11, 19, 23, 35, 43, 51, 55, then for all k first sink emerges at the 7th, 9th, 7th, 9th, 7th, 9th, 7th, 9th iterates, respectively.

Examples

			n=0: 64n + 59 = 59, the list = {59,178,89,268,134,67,202,101,304,152,76,38,...} the 12th term = 38 < 59 = the initial value, so a(0)=12.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[m, Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, m, # >= m - 1 &]][64 n + 59], {n, 0, 84}] (* Michael De Vlieger, Mar 25 2017 *)
  • PARI
    A006370(n) = if(n%2, 3*n+1, n/2);
    A074473(n) = if(1==n,n,my(org_n=n); for(i=1,oo,if(nA006370(n)));
    A075482(n) = A074473((64*n)+59); \\ Antti Karttunen, Oct 09 2018

Formula

a(n) = A074473(64n + 59).

A076228 Number of terms k in the trajectory of the Collatz function applied to n such that k < n.

Original entry on oeis.org

0, 1, 2, 2, 3, 5, 4, 3, 6, 5, 6, 8, 6, 9, 6, 4, 8, 13, 10, 7, 5, 11, 8, 10, 13, 9, 9, 15, 13, 10, 9, 5, 16, 11, 8, 19, 17, 16, 17, 8, 12, 7, 19, 15, 13, 11, 12, 11, 19, 20, 17, 11, 9, 17, 14, 19, 23, 18, 21, 15, 13, 16, 14, 6, 22, 24, 21, 14, 12, 11, 15, 22, 18, 21, 7, 21, 19, 25, 22, 9
Offset: 1

Views

Author

Labos Elemer, Oct 01 2002

Keywords

Comments

It is believed that for each x, a(n) = x occurs a finite number of times and the largest n is 2^x.
Original name: Start iteration of Collatz-function (A006370) with initial value of n. a(n) shows how many times during fixed-point-list, the value sinks below initial one until reaching endpoint = 1. - Michael De Vlieger, Dec 13 2018

Examples

			A070165(18) = {18, 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1}. a(18) = 13 because 13 terms are smaller than n = 18; namely: {9, 14, 7, 11, 17, 13, 10, 5, 16, 8, 4, 2, 1}.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1) f[1]=1; f0[x_] := Delete[FixedPointList[f, x], -1] f1[x_] := f0[x]-Part[f0[x], 1] f2[x_] := Count[Sign[f1[x]], -1] Table[f2[w], {w, 1, 256}]
    (* Second program: *)
    Table[Count[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], ?(# < n &)], {n, 80}] (* _Michael De Vlieger, Dec 09 2018 *)

A177789 Irregular triangle read by rows in which row n gives the congruences (mod 2^A020914(n)) satisfied by the numbers having dropping time A122437(n+1) in the Collatz (3x+1) iteration.

Original entry on oeis.org

0, 1, 3, 11, 23, 7, 15, 59, 39, 79, 95, 123, 175, 199, 219, 287, 347, 367, 423, 507, 575, 583, 735, 815, 923, 975, 999, 231, 383, 463, 615, 879, 935, 1019, 1087, 1231, 1435, 1647, 1703, 1787, 1823, 1855, 2031, 2203, 2239, 2351, 2587, 2591, 2907, 2975, 3119
Offset: 0

Views

Author

T. D. Noe, May 13 2010

Keywords

Comments

The dropping time is the number of Collatz iterations required to reach a lower number than starting value. Garner mentions these congruences. The first term in row n is A122442(n+1) for n > 1. The length of row n is A100982(n).
The triangle means:
numbers 0 (mod 2) and > 0 have dropping time 1;
numbers 1 (mod 4) and > 1 have dropping time 3;
numbers 3 (mod 16) have dropping time 6;
numbers 11, 23 (mod 32) have dropping time 8;
numbers 7, 15, 59 (mod 128) have dropping time 11;
numbers 39, 79, 95, 123, 175, 199, 219 (mod 256) have dropping time 13.
Theorem: a(n) can be evaluated using a directed rooted tree produced by a precise algorithm. Each node of this tree is given by a unique Diophantine equation whose only positive solutions are the integers with a finite stopping time. The algorithm generates (in a three step loop) the parity vectors which define the Diophantine equations. The two directions of the construction principle gives the tree a triangular form which extends ever more downwards with each column. There exist explicit arithmetic relationships between the parent and child vertices. As a consequence, a(n) can be generated algorithmically. The algorithm also generates A100982. - Mike Winkler, Sep 12 2017

Examples

			Triangle begins:
   0;
   1;
   3;
  11,  23;
   7,  15,  59;
  39,  79,  95, 123, 175, 199, 219;
  ...
From _Mike Winkler_, Sep 12 2017: (Start)
The beginning of the directed rooted tree produced by the algorithm of the Theorem. The triangular form can be seen clearly. The way the tree structure is sorting a(n), respectively the residue classes, mirrors the explicit arithmetic relationships mentioned in the Theorem.
3 (mod 2^4) -- 11 (mod 2^5) -- 59 (mod 2^7) -- 123 (mod 2^8) --
                    |                                |
                    |                          219 (mod 2^8) --
                    |
                    |
               23 (mod 2^5) --- 7 (mod 2^7) -- 199 (mod 2^8) --
                                    |                |
                                    |           39 (mod 2^8) --
                                    |
                                    |
                               15 (mod 2^7) --- 79 (mod 2^8) --
                                                     |
                                               175 (mod 2^8) --
                                                     |
                                                95 (mod 2^8) --
(End)
		

Crossrefs

Cf. A060445 (dropping time of odd numbers), A100982.

Programs

  • Mathematica
    DroppingTime[n_] := Module[{m=n, k=0}, If[n>1, While[m>=n, k++; If[EvenQ[m], m=m/2, m=3*m+1]]]; k]; dt=Floor[1+Range[0,20]*Log[2,6]]; e=Floor[1+Range[0,20]*Log[2,3]]; Join[{0,1}, Flatten[Table[Select[Range[3,2^e[[n]],2], DroppingTime[ # ]==dt[[n]] &], {n,2,8}]]]
  • PARI
    /* algorithm for generating the parity vectors of the Theorem, the tree structure is given by the three STEP's */
    {k=3; Log32=log(3)/log(2); limit=14; /*or limit>14*/ T=matrix(limit,60000); xn=3; /*initial tuple for n=1*/ A=[]; for(i=1, 2, A=concat(A,i)); A[1]=1; A[2]=1; T[1,1]=A; for(n=2, limit, print("n="n); Sigma=floor(1+(n+1)*Log32); d=floor(n*Log32)-floor((n-1)*Log32); Kappa=floor(n*Log32); Kappa2=floor((n-1)*Log32);r=1; v=1; until(w==0, A=[]; for(i=1, Kappa2+1, A=concat(A,i)); A=T[n-1,v]; B=[]; for(i=1, Kappa+1, B=concat(B,i)); for(i=1, Kappa2+1, B[i]=A[i]); /* STEP 1 */ if(d==1, B[k]=1; T[n,r]=B; r++; v++); if(d==2, B[k]=0; B[k+1]=1; T[n,r]=B; r++; v++); /* STEP 2 */ if(B[Kappa]==0, for(j=1, Kappa-n, B[Kappa+1-j]=B[Kappa+2-j]; B[Kappa+2-j]=0; T[n,r]=B; r++; if(B[Kappa-j]==1, break(1)))); /* STEP 3 */ w=0; for(i=n+2, Kappa+1, w=w+B[i]));k=k+d; p=1; h2=3; for(i=1, r-1, h=0; B=T[n,i]; until(B[h]==0, h++); if(h>h2, p=1; h2++; print); print(T[n,i]"  "p"  "i); p++); print)} \\ Mike Winkler, Sep 12 2017
    
  • PARI
    row(n) = if (n < 2, [n], my(v = vector(2^(A020914(n)-1), k, 2*k-1)); apply(x->2*x-1, Vec(select(x->(x == 1+A122437(n+1)), apply(A074473, v), 1)))); \\ Michel Marcus, Aug 15 2025
    
  • PARI
    row(n)={if(n<1, [0], my(r=[1], d=[2], km=2); for(i=1, n-1, my(temp1=[], temp2=[], c=if(3^(i+1)<2^(km+1),1,2)); for(j=1, #d, temp1=concat(temp1, vector(d[j]-1, m, 3*r[j]+2^(km-d[j]+m))); temp2=concat(temp2, vector(d[j]-1, m, d[j]-m+c))); km=km+c; r=temp1; d=temp2; ); vecsort(apply(x->((-x)*lift(Mod(1/3^n, 2^km)))%2^km, r)))} \\ V. Barbera, Aug 15 2025
Showing 1-10 of 19 results. Next