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

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

A024023 a(n) = 3^n - 1.

Original entry on oeis.org

0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, 59048, 177146, 531440, 1594322, 4782968, 14348906, 43046720, 129140162, 387420488, 1162261466, 3486784400, 10460353202, 31381059608, 94143178826, 282429536480, 847288609442, 2541865828328, 7625597484986, 22876792454960
Offset: 0

Views

Author

Keywords

Comments

Number of different directions along lines and hyper-diagonals in an n-dimensional cubic lattice for the attacking queens problem (A036464 in n=2, A068940 in n=3 and A068941 in n=4). The n-dimensional direction vectors have the a(n)+1 Cartesian coordinates (i,j,k,l,...) where i,j,k,l,... = -1, 0, or +1, excluding the zero-vector i=j=k=l=...=0. The corresponding hyper-line count is A003462. - R. J. Mathar, May 01 2006
Total number of sequences of length m=1,...,n with nonzero integer elements satisfying the condition Sum_{k=1..m} |n_k| <= n. See the K. A. Meissner link p. 6 (with a typo: it should be 3^([2a]-1)-1). - Wolfdieter Lang, Jan 21 2008
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x and y are disjoint and either 0) x is a proper subset of y or y is a proper subset of x, or 1) x is not a subset of y and y is not a subset of x. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Number of neighbors in Moore's neighborhood in n dimensions. - Dmitry Zaitsev, Nov 30 2015
Number of terms in conjunctive normal form of Boolean expression with n variables. E.g., a(2) = 8: [~x, ~y, x, y, ~x|~y, ~x|y, x|~y, x|y]. - Yuchun Ji, May 12 2023
Number of rays of the Coxeter arrangement of type B_n. Equivalently, number of facets of the n-dimensional type B permutahedron. - Jose Bastidas, Sep 12 2023

Examples

			From _Zerinvary Lajos_, Jan 14 2007: (Start)
Ternary......decimal:
0...............0
2...............2
22..............8
222............26
2222...........80
22222.........242
222222........728
2222222......2186
22222222.....6560
222222222...19682
2222222222..59048
etc...........etc.
(End)
Sequence combinatorics: n=3: With length m=1: [1],[2],[3] each with 2 signs, with m=2: [1,1], [1,2], [2,1], each 2^2 = 4 times from choosing signs; m=3: [1,1,1] coming in 2^3 signed versions: 3*2 + 3*4 + 1*8 = 26 = a(3). The order is important, hence the M_0 multinomials A048996 enter as factors.
A027902 gives the 384 divisors of a(24). - _Reinhard Zumkeller_, Mar 11 2010
		

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.

Crossrefs

Cf. triangle A013609.
Cf. second column of A145901.

Programs

Formula

a(n) = A000244(n) - 1.
a(n) = 2*A003462(n). - R. J. Mathar, May 01 2006
A128760(a(n)) > 0. - Reinhard Zumkeller, Mar 25 2007
G.f.: 2*x/((-1+x)*(-1+3*x)) = 1/(-1+x) - 1/(-1+3*x). - R. J. Mathar, Nov 19 2007
a(n) = Sum_{k=1..n} Sum_{m=1..k} binomial(k-1,m-1)*2^m, n >= 1. a(0)=0. From the sequence combinatorics mentioned above. Twice partial sums of powers of 3.
E.g.f.: e^(3*x) - e^x. - Mohammad K. Azarian, Jan 14 2009
a(n) = A024101(n)/A034472(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = 3*a(n-1) + 2 (with a(0)=0). - Vincenzo Librandi, Nov 19 2010
E.g.f.: -E(0) where E(k) = 1 - 3^k/(1 - x/(x - 3^k*(k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
a(n) = A227048(n,A020914(n)). - Reinhard Zumkeller, Jun 30 2013
Sum_{n>=1} 1/a(n) = A214369. - Amiram Eldar, Nov 11 2020
a(n) = Sum_{k=1..n} 2^k*binomial(n,k). - Ridouane Oudra, Jun 15 2025
From Peter Bala, Jul 01 2025: (Start)
For n >= 1, a(2*n)/a(n) = A034472(n) and a(3*n)/a(n) = A034513(n).
Modulo differences in offsets, exp( Sum_{n >= 1} a(k*n)/a(n)*x^n/n ) is the o.g.f. of A003462 (k = 2), A006100 (k = 3), A006101 (k = 4), A006102 (k = 5), A022196 (k = 6), A022197 (k = 7), A022198 (k = 8), A022199 (k = 9), A022200 (k = 10), A022201 (k = 11), A022202 (k = 12) and A022203 (k = 13).
The following are all examples of telescoping series:
Sum_{n >= 1} 3^n/(a(n)*a(n+1)) = 1/2^2; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/(2*8^2).
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+k)) = 1/(a(1)*a(2)*...*a(k)*a(k)).
Sum_{n >= 1} 3^n/(a(n)*a(n+2)) = 5/64; Sum_{n >= 1} (-3)^n/(a(n)*a(n+2)) = -3/64.
Sum_{n >= 1} 3^n/(a(n)*a(n+4)) = 703/83200; Sum_{n >= 1} (-3)^n/(a(n)*a(n+4)) = - 417/83200. (End)

A056576 Highest k with 2^k <= 3^n.

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 17, 19, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 38, 39, 41, 42, 44, 45, 47, 49, 50, 52, 53, 55, 57, 58, 60, 61, 63, 64, 66, 68, 69, 71, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, 91, 93, 95, 96, 98, 99, 101, 103, 104, 106, 107
Offset: 0

Views

Author

Henry Bottomley, Jun 29 2000

Keywords

Examples

			a(3)=4 because 3^3=27 and 2^4=16 is power of 2 immediately below 27.
		

Crossrefs

Cf. A000079 (powers of 2), A000244 (powers of 3), A020914, A022921.
Cf. A056850, A117630 (complement), A020857 (decimal expansion of log_2(3)), A076227, A100982.

Programs

Formula

a(n) = floor(log_2(3^n)) = log_2(A000244(n)-A056576(n)) = a(n-1)+A022921(n-1).
a(n) = A020914(n) - 1. - L. Edson Jeffery, Dec 12 2014

A100982 Number of admissible sequences of order j; related to 3x+1 problem and Wagon's constant.

Original entry on oeis.org

1, 1, 2, 3, 7, 12, 30, 85, 173, 476, 961, 2652, 8045, 17637, 51033, 108950, 312455, 663535, 1900470, 5936673, 13472296, 39993895, 87986917, 257978502, 820236724, 1899474678, 5723030586, 12809477536, 38036848410, 84141805077, 248369601964
Offset: 1

Views

Author

Steven Finch, Jan 13 2005

Keywords

Comments

Eric Roosendaal counted all admissible sequences up to order j=1000 (2005). Note: there is a typo in both Wagon and Chamberland in the definition of Wagon's constant 9.477955... The expression floor(1 + 2*i + i*log_2(3)) should be replaced by floor(1 + i + i*log_2(3)).
The length of all admissible sequences of order j is A020914(j). - T. D. Noe, Sep 11 2006
Conjecture: a(n) is given for each n > 3 by a formula using a(2)..a(n-1). This allows us to create an iterative algorithm which generates a(n) for each n > 6. This has been proved for each n <= 53. For higher values of n the algorithm must be slightly modified. - Mike Winkler, Jan 03 2018
Theorem 1: a(k) is given for each k > 1 by a formula using a(1)..a(k-1). Namely, a(1)=1 and a(k+1) = Sum_{m=1..k} (-1)^(m-1)*binomial(floor((k-m+1)*(log(3)/log(2))) + m - 1, m)*a(k-m+1) for k >= 1. - Vladimir M. Zarubin, Sep 25 2015
Theorem 2: 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 connection with A076227, A056576 and A022921. - Mike Winkler, Sep 12 2017
A177789 shows another theorem and algorithm for generating a(n). - Mike Winkler, Sep 12 2017

Examples

			The unique admissible sequence of order 1 is 3/2, 1/2.
The unique admissible sequence of order 2 is 3/2, 3/2, 1/2, 1/2.
The two admissible sequences of order 3 are 3/2, 3/2, 3/2, 1/2, 1/2 and 3/2, 3/2, 1/2, 3/2, 1/2.
a(13) = 8045 = binomial(floor(5*(13-2)/3), 13-2)
- Sum_{i=2..6} binomial(floor((3*(13-i)+0)/2), 13-i)*a(i)
- Sum_{i=7..11} binomial(floor((3*(13-i)-1)/2), 13-i)*a(i)
- Sum_{i=12..12} binomial(floor((3*(13-i)-2)/2), 13-i)*a(i)
= 31824 - 4368*1 - 3003*2 - 715*3 - 495*7 - 120*12 - 28*30 - 21*85 - 5*173 - 4*476 - 1*961 - 0*2652. (Conjecture)
From _Mike Winkler_, Sep 12 2017: (Start)
The next table shows how Theorem 2 works. No entry is equal to zero.
n =       3  4  5   6   7   8   9  10  11   12 .. |A076227(k)=
--------------------------------------------------|
k =  2 |  1                                       |     1
k =  3 |  1  1                                    |     2
k =  4 |     2  1                                 |     3
k =  5 |        3   1                             |     4
k =  6 |        3   4   1                         |     8
k =  7 |            7   5   1                     |    13
k =  8 |               12   6   1                 |    19
k =  9 |               12  18   7   1             |    38
k = 10 |                   30  25   8   1         |    64
k = 11 |                   30  55  33   9    1    |   128
:      |                        :   :   :    : .. |    :
--------------------------------------------------|---------
a(n) =    2  3  7  12  30  85 173 476 961 2652 .. |
The entries (k,n) in this table are generated by the rule (k+1,n) = (k,n) + (k,n-1). The last value of (k+1,n) is given by k+1 = A056576(n-1), or the highest value in column n is given twice only if A022921(n-2) = 2. Then a(n) is equal to the sum of the entries in column n. For n = 7 there is 1 = 0 + 1, 5 = 1 + 4, 12 = 5 + 7, 12 = 12 + 0. Therefore a(7) = 1 + 5 + 12 + 12 = 30. The sum of row k is equal to A076227(k). (End)
From _Ruud H.G. van Tol_, Dec 04 2023: (Start)
A tree view.
n-tree--A098294--ids-----paths-----------------a(n)
0 ._          0  0       0                       -
1 |_          1  1       10                      1
2 |_._        2  2       1100                    1
3 |_|_        2  3-4     11010     -   11100     2
4 |_|_._      3  5-7     1101100   -  1111000    3
5 |_|_|_      3  8-14    11011010  - 11111000    7
6 |_|_|_._    4  15-26   1101101100-1111110000  12
7 |_|_|_|_._  5  27-56   ...                    30
8 |_|_|_|_|_  5  57-141  ...                    85
...
For n>=1, the endpoints are at A098294(n) to the right.
(End)
		

Crossrefs

Cf. A122790 (Wagon's constant), A076227, A056576, A022921, A098294, A177789.

Programs

  • Mathematica
    (* based on Eric Roosendaal's algorithm *) nn=100; Clear[x,y]; Do[x[i]=0, {i,0,nn+1}]; x[1]=1; t=Table[Do[y[cnt]=x[cnt]+x[cnt-1], {cnt,p+1}]; Do[x[cnt]=y[cnt], {cnt,p+1}]; admis=0; Do[If[(p+1-cnt)*Log[3]T. D. Noe, Sep 11 2006 *)
  • PARI
    /* translation of the above code from T. D. Noe */
    {limit=100; n=1; x=y=vector(limit+1); x[1]=1; for(b=2, limit, for(c=2, b+1, y[c]=x[c]+x[c-1]); for(c=2, b+1, x[c]=y[c]); a_n=0; for(c=1, b+1, if((b+1-c)*log(3)Mike Winkler, Feb 28 2015
    
  • PARI
    /* algorithm for the Conjecture */
    {limit=53; zn=vector(limit); zn[2]=1; zn[3]=2; zn[4]=3; zn[5]=7; zn[6]=12; f=1; e1=-1; e2=-2; for(n=7, limit, m=floor((n-1)*log(3)/log(2))-(n-1); j=(m+n-2)!/(m!*(n-2)!); if(n>6*f, if(frac(n/2)==0, e=e1, e=e2)); if(frac((n-6 )/12)==0, f++; e1=e1+2); if(frac((n-12)/12)==0, f++; e2=e2+2); Sum=a=b=0; c=1; d=5; until(c>=n-1, for(i=2+a*5+b, 1+d+a*5, if(i>11 && frac((i+2)/6)==0, b++); delta=e-a; Sum=Sum+binomial(floor((3*(n-i)+delta)/2),n-i)*zn[i]; c++); a++; for(k=3, 50, if(n>=k*6 && a==k-1, d=k+3))); zn[n]=j-Sum; print(n" "zn[n]))} \\ Mike Winkler, Jan 03 2018
    
  • PARI
    /* cf. code for Theorem 2 */
    {limit=100; /*or limit>100*/ p=q=vector(limit); c=2; w=log(3)/log(2); for(n=3, limit, p[1]=Sum=1; for(i=2, c, p[i]=p[i-1]+q[i]; Sum=Sum+p[i]); a_n=Sum; print(n" "a_n); for(i=1, c, q[i]=p[i]); d=floor(n*w)-floor((n-1)*w); if(d==2, c++)); } \\ Mike Winkler, Apr 14 2015
    
  • PARI
    /* algorithm for Theorem 1 */
    n=20; a=vector(n); log32=log(3)/log(2);
    {a[1]=1; for ( k=1, n-1, a[k+1]=sum( m=1,k,(-1)^(m-1)*binomial( floor( (k-m+1)*log32)+m-1,m)*a[k-m+1] ); print(k" "a[k]) );
    } \\ Vladimir M. Zarubin, Sep 25 2015
    
  • PARI
    /* algorithm for Theorem 2 */
    {limit=30; /*or limit>30*/ R=matrix(limit,limit); R[2,1]=0; R[2,2]=1; for(n=2, limit, print; print1("For n="n" in column n: "); Kappa_n=floor(n*log(3)/log(2)); a_n=0; for(k=n, Kappa_n, R[k+1,n]=R[k,n]+R[k,n-1]; print1(R[k+1,n]", "); a_n=a_n+R[k+1,n]); print; print(" and the sum is a(n)="a_n))} \\ Mike Winkler, Sep 12 2017

Formula

A sequence s(k), where k=1, 2, ..., n, is *admissible* if it satisfies s(k)=3/2 exactly j times, s(k)=1/2 exactly n-j times, s(1)*s(2)*...*s(n) < 1 but s(1)*s(2)*...*s(m) > 1 for all 1 < m < n.
a(n) = (m+n-2)!/(m!*(n-2)!) - Sum_{i=2..n-1} binomial(floor((3*(n-i)+b)/2), n-i)*a(i), where m = floor((n-1)*log_2(3))-(n-1) and b assumes different integer values within the sum at intervals of 5 or 6 terms. (Conjecture)
a(n) = Sum_{k=n-1..A056576(n-1)} (k,n). (Theorem 2, cf. example)
a(k) = 2*A076227(A020914(k)-1) - A076227(A020914(k)), for k > 0. - Vladimir M. Zarubin, Sep 29 2019
a(1)=1, a(n) = Sum_{k=0..A020914(n-1)-n-2} A325904(k)*binomial(A020914(n-1)-k-2, n-2) for n>1. - Benjamin Lombardo, Oct 18 2019

Extensions

Two more terms from Jules Renucci (jules.renucci(AT)wanadoo.fr), Nov 02 2005
More terms from T. D. Noe, Sep 11 2006

A122458 "Dropping time" of the reduced Collatz iteration starting with 2n+1.

Original entry on oeis.org

0, 2, 1, 4, 1, 3, 1, 4, 1, 2, 1, 3, 1, 37, 1, 35, 1, 2, 1, 5, 1, 3, 1, 34, 1, 2, 1, 3, 1, 4, 1, 34, 1, 2, 1, 32, 1, 3, 1, 5, 1, 2, 1, 3, 1, 28, 1, 5, 1, 2, 1, 26, 1, 3, 1, 19, 1, 2, 1, 3, 1, 5, 1, 9, 1, 2, 1, 4, 1, 3, 1, 4, 1, 2, 1, 3, 1, 25, 1, 13, 1, 2, 1, 18, 1, 3, 1, 5, 1, 2, 1, 3, 1, 4, 1, 8, 1, 2, 1, 5
Offset: 0

Views

Author

T. D. Noe, Sep 08 2006

Keywords

Comments

We count only the 3x+1 steps of the usual Collatz iteration. We stop counting when the iteration produces a number less than the initial 2n+1. For a fixed dropping time k, let N(k)=A100982(k) and P(k)=2^(A020914(k)-1). There are exactly N(k) odd numbers less than P(k) with dropping time k. Moreover, the sequence is periodic: if d is one of the N(k) odd numbers, then k=a(d)=a(d+i*P(k)) for all i>=0. This periodicity makes it easy to compute the average dropping time of the reduced Collatz iteration: Sum_{k>0} k*N(k)/P(k) = 3.492651852186... (A122791).

Examples

			a(3)=4 because, starting with 7, the iteration produces 11,17,13,5 and the last term is less than 7.
n = 13: the fr trajectory for 2*13+1 = 27 is 41, 31, 47, 71, 107, 161, 121, 91, 137, 103, 155, 233, 175, 263, 395, 593, 445, 167, 251, 377, 283, 425, 319, 479, 719, 1079, 1619, 2429, 911, 1367, 2051, 3077, 577, 433, 325, 61, 23, 35, 53, 5, 1 with 41 terms (without 27), hence fr^[37] = 23 < 27  and  a(13) = 37. - _Wolfdieter Lang_, Feb 20 2019
		

References

  • Victor Klee and Stan Wagon, Old and New Unsolved Problems in Plane Geometry and Number Theory, Mathematical Association of America (1991) pp. 225-229, 308-309. [called on p. 225 stopping time for 2n+1 and the function C(2*n+1) = A075677(n+1), n >= 0. - Wolfdieter Lang, Feb 20 2019]

Crossrefs

Cf. A000265, A060445, A075677 (one step of the reduced Collatz iteration), A075680.
Cf. A087113 (indices of 1's), A017077 (indices of 2's), A122791 (limit mean).

Programs

  • Mathematica
    nextOddK[n_]:=Module[{m=3n+1}, While[EvenQ[m], m=m/2]; m]; dt[n_]:=Module[{m=n, cnt=0}, If[n>1, While[m=nextOddK[m]; cnt++; m>n]]; cnt]; Table[dt[n],{n,1,301,2}]

Formula

a(n) is the least k for which fr^[k](n) < 2*n + 1, for n >= 1 and k >= 1, where fr(n) = A075677(n+1) = A000265(3*n+2). No k satisfies this for n = 0: a(0) := 0 by convention. The dropping time a(n) is finite, for n >= 1, if the Collatz conjecture is true. - Wolfdieter Lang, Feb 20 2019
a(1+i*8) = 2, for i>=0, because A100982(2) = 1 is odd, and A020914(2) = 4 gives P(2) = 2^(4-1) = 8. - Ruud H.G. van Tol, Dec 19 2021

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

A022330 Index of 3^n within sequence of numbers of form 2^i*3^j (A003586).

Original entry on oeis.org

1, 3, 7, 12, 19, 27, 37, 49, 62, 77, 93, 111, 131, 152, 175, 199, 225, 252, 281, 312, 344, 378, 413, 450, 489, 529, 571, 614, 659, 705, 753, 803, 854, 907, 961, 1017, 1075, 1134, 1195, 1257, 1321, 1386, 1453, 1522, 1592, 1664, 1737, 1812, 1889, 1967, 2047, 2128
Offset: 0

Views

Author

Keywords

Comments

a(1000)=793775, a(10000)=79261054, a(100000)=7924941755, a(1000000)=792482542841.

Crossrefs

Cf. A022331, A020914 (first differences).

Programs

  • Mathematica
    c[0] = 1; c[n_] := 1 + Sum[Ceiling[j*Log[2, 3]], {j, n}]; Table[c[i], {i, 0, 51}] (* Norman Carey, Jun 13 2012 *)
  • PARI
    listsm(lim)=my(v=List(),N); for(n=0,log(lim)\log(3),N=3^n; while(N<=lim,listput(v,N);N<<=1)); v=Vec(v); vecsort(v)
    list(lim)=my(v=listsm(3^floor(lim)));vector(floor(lim+1),i,setsearch(v,3^(i-1))) \\ Charles R Greathouse IV, Aug 19 2011
    
  • PARI
    a(n)=sum(k=0,n, logint(3^k,2))+n+1 \\ Charles R Greathouse IV, Nov 22 2022
    
  • Python
    def A022330(n): return sum((3**i).bit_length() for i in range(n+1)) # Chai Wah Wu, Sep 16 2024

Formula

a(n) = A071521(A000244(n)); A003586(a(n)) = A000244(n). - Reinhard Zumkeller, May 09 2006
a(n) ~ kn^2 with k = log(3)/log(4) = 0.792.... More exact asymptotics? - Zak Seidov, Dec 22 2011
a(n+1) = a(n) + A020914(n+1). - Ruud H.G. van Tol, Nov 25 2022
kn^2 + kn + 1 <= a(n) <= kn^2 + (k+1)n + 1, so a(n) = kn^2 + O(n) with k = log(3)/log(4). The law of the iterated logarithm suggests that a better error term might be possible. - Charles R Greathouse IV, Nov 28 2022

A098294 a(n) = ceiling(n*log_2(3/2)).

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 27, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 34, 35, 36, 36, 37, 37, 38, 39, 39, 40, 40, 41, 41, 42, 43, 43, 44
Offset: 0

Views

Author

Wolfdieter Lang, Oct 18 2004

Keywords

Comments

Original name was: Smallest exponent of 2 which gives a power of 2 which is equal to or bigger than (3/2)^n, n = 0,1,... .
Stacking perfect fifths (the frequency ratio of a fifth is 3/2) this sequence determines into which octave the n-th fifth falls. For example, the third fifth, (3/2)^3, falls into the second octave, which means that it lies in the interval [2^1,2^2)=[2,4). The k-th octave comprises ratios in the interval [2^(k-1),2^k), k=1,2,...
Related to the initial number of sequential even terms in an "ideal" sequence under iteration of the 3x+1 Problem on a positive odd value m, where the piecewise function f is given by f(2*m)=m, f(2*m+1)=6*m+4, to ensure f^A122437(n) (m) < m, where n > 1 is the number of odds in the sequence (including m) and floor(1+n*(log(3)/log(2))) is the number of evens. An "ideal" sequence minimizes the effects of f(2*m+1) by following a certain order of even or odd terms along with the rules of the function. A representation of such sequences in terms of parity sequences for values n >= 2 follows:
n=2, (o,e,e,o,e,e)
n=3, (o,e,e,o,e,o,e,e)
n=4, (o,e,e,e,o,e,o,e,o,e,e)
n=5, (o,e,e,e,o,e,o,e,o,e,o,e,e)
n=6, (o,e,e,e,e,o,e,o,e,o,e,o,e,o,e,e)
n=7, (o,e,e,e,e,e,o,e,o,e,o,e,o,e,o,e,o,e,e)
The pattern is clear, and the formula for the initial number of sequential even terms in each sequence is given by a(n) = floor(1+n*(log(3)/log(2)))-n for n > 1, where the sum of the number of even and odd terms is given by A122437(n) for n > 1. Of course, most values m do not have sequences following this pattern of iteration under f. Also, the reason for placing an extra even term at the end of such sequences is to mitigate to some degree the effects of the possibility that the last odd term is only "slightly" larger than m, i.e., (3*m+1)/4 < m for all m > 1. - Jeffrey R. Goodwin, Aug 25 2011
a(n) gives the position in n-th row of A227048 where (3^n - 2^n) occurs:
A227048(n,a(n)) = A001047(n). - Reinhard Zumkeller, Jun 30 2013
Differs from A005378 at indices n = 0,17,20,22,25,27,29,30,... - M. F. Hasler, Jun 29 2014

Examples

			a(0) = 0 because 2^0 = 1 = (3/2)^0 but 2^(-1) = 1/2 < 1.
a(11) = 7 because 2^7 = 128 > 86.497... = (3/2)^11 but 2^6 = 64 < (3/2)^11.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a098294 0  = 0
    a098294 n  = fromJust (a001047 n `elemIndex` a227048_row n) + 1
    -- Reinhard Zumkeller, Jun 30 2013
    
  • Magma
    [0] cat [Floor(1 + n * Log(3)/Log(2)) - n: n in [1..70]]; // Vincenzo Librandi, Jul 13 2015
    
  • Maple
    seq(ceil(n*log[2](3/2)),n=0..100); # Robert Israel, Jul 12 2015
  • Mathematica
    With[{c=Log2[3/2]},Ceiling[c*Range[0,80]]] (* Harvey P. Dale, Feb 24 2024 *)
  • PARI
    a(n)=ceil(n*log(3/2)/log(2)) \\ Charles R Greathouse IV, Jul 13 2015
    
  • PARI
    a(n) = !!n + logint(3^n, 2) - n \\ Ruud H.G. van Tol, Nov 21 2023

Formula

2^a(n) >= (3/2)^n but 2^(a(n) - 1) < (3/2)^n, n >= 0.
a(n) = ceiling(tau*n) with tau := log(3)/log(2) - 1 = 0.584962501..., n >= 0.
a(n) = floor(1 + n * log(3)/log(2)) - n, n >= 1. - Mike Winkler, Dec 31 2010

A122437 Allowable values of the "dropping time" of the Collatz (3x+1) iteration.

Original entry on oeis.org

1, 3, 6, 8, 11, 13, 16, 19, 21, 24, 26, 29, 32, 34, 37, 39, 42, 44, 47, 50, 52, 55, 57, 60, 63, 65, 68, 70, 73, 75, 78, 81, 83, 86, 88, 91, 94, 96, 99, 101, 104, 106, 109, 112, 114, 117, 119, 122, 125, 127, 130, 132, 135, 138, 140, 143, 145, 148, 150, 153, 156, 158, 161
Offset: 1

Views

Author

T. D. Noe, Sep 06 2006

Keywords

Comments

Only these numbers appear in A060445, which tabulates the "dropping time" of odd numbers. Note that all even numbers have a "dropping time" of 1.
a(n) is also the number of binary digits of 6^(n-1); for example, a(4)=8 since 6^(4-1)=216 in binary is 11011000, an 8-digit number. - Julio Cesar de la Yncera, Mar 28 2009
A positive integer (x) is an allowable value if and only if (x-1)/(1+log(2)/log(3)) - floor(x/(1+log(2)/log(3))) is not negative. - K. Spage, Oct 22 2009
Here the word "allowable" means that it is necessary for a sequence of iterates starting from odd value m to arrive at a value x = f^{floor(1+n+n*log(3)/log(2))}(m) < m, where n gives the number of odds in such a sequence including m, to have undergone precisely floor(1+n+n*log(3)/log(2)) iterations of f, where f(2*m)=m, f(2*m+1)=6*m+4. However, the formula for a(n+1) does not fully account for the order of odds and evens in such a sequence because it does not account for the effects of the "+1". Thus it is unknown whether it maximizes the value x for all values m. For example, fix m = 1 and the "+1" is enough to give the trivial cycle. So it is possible that for some m we have f^{floor(1+n+n*log(3)/log(2))}(m) >= m. - Jeffrey R. Goodwin, Aug 24 2011
The indices of the powers of 3 in A006899. - Ruud H.G. van Tol, Nov 02 2022

Crossrefs

Cf. A022921 (number of 2^m between 3^n and 3^(n+1)), A122442 (least k having dropping time a(n)).
Cf. A006899.

Programs

Formula

a(1) = 1, a(n+1) = a(n) + A022921(n-1) + 1.
a(n+1) = floor(1 + n + n*log(3)/log(2)). - T. D. Noe, Sep 08 2006
a(n) = floor((1 + log(2)/log(3))*A020914(n-1)). - K. Spage, Oct 22 2009
a(n) = A020914(n-1) + n - 1. - K. Spage, Oct 23 2009 [corrected by Ruud H.G. van Tol, Nov 03 2022]
a(n) = a(n-1)+2 if 3^(n-1) < 2^(a(n-1)+2-(n-1)); a(n) = a(n-1)+3 otherwise. - V. Barbera, Aug 12 2025

Extensions

Comment corrected and edited by Jon E. Schoenfield, Feb 27 2014

A020915 Number of digits in base-3 representation of 2^n.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 43, 44, 45, 45, 46, 47
Offset: 0

Views

Author

Keywords

Comments

For n > 0, first differences of A022331. - Michel Marcus, Oct 03 2013

Crossrefs

Cf. A022924 (first differences).

Programs

Formula

a(n) = 1 + floor(n*log_3(2)) = 1 + floor(n*A102525) = 1 + A136409(n). - R. J. Mathar, May 23 2009
a(n) = A081604(A000079(n)). - Reinhard Zumkeller, Jul 12 2011
a(A020914(n)) = n + 1. - Reinhard Zumkeller, Mar 28 2015

Extensions

More terms from James Sellers
Showing 1-10 of 29 results. Next