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.

Previous Showing 21-29 of 29 results.

A122791 Decimal expansion of the average "dropping time" of the reduced 3x+1 iteration.

Original entry on oeis.org

3, 4, 9, 2, 6, 5, 1, 8, 5, 2, 1, 8, 6, 4, 2, 4, 9, 1, 2, 3, 0, 5, 5, 6, 0, 3, 3, 7, 5, 2, 9, 6, 8, 0, 6, 4, 7, 4, 2, 7, 2, 9, 0, 5, 3, 4, 8, 0, 9, 0, 9, 9, 9, 0, 5, 3, 0, 9, 1, 4, 7, 4, 5, 2, 2, 2, 2, 3, 3, 8, 4, 4, 0, 7, 2, 0, 8, 2, 7, 6, 0, 5, 9, 1, 8, 7, 0, 2, 2, 8, 5, 5, 1, 9, 1, 0, 3, 4, 6, 7, 5, 4, 8, 1, 4
Offset: 1

Views

Author

T. D. Noe, Sep 11 2006

Keywords

Crossrefs

Cf. A122458 (dropping time of the reduced Collatz iteration), A100982, A122790.

Formula

Sum{k>0} k*A100982(k)/2^(A020914(k)-1) = 3.49265185218642491230556033752968...

A186008 Irregular triangle T(n,k) read by rows, in which row n has the pattern of conjectured dropping times in the Collatz iteration.

Original entry on oeis.org

2, 4, 16, 12, 32, 8, 52, 128, 40, 56, 84, 136, 160, 180, 256, 60, 80, 136, 220, 288, 296, 448, 528, 636, 688, 712, 1024, 152, 232, 384, 648, 704, 788, 856, 1000, 1204, 1416, 1472, 1556, 1592, 1624, 1800, 1972, 2008, 2120, 2356, 2360, 2676, 2744, 2888, 2912, 3064, 3328, 3444, 3680, 3832, 4096
Offset: 1

Views

Author

T. D. Noe, Feb 09 2011

Keywords

Comments

Consider A126241, the sequence of dropping times in the Collatz iteration. Only zero and the numbers in A020914 can be dropping times. The dropping times in A126241 have a definite pattern. For example, 1 appears at positions n = 2 + 2*i, for i=0,1,2,3,... Similarly, 2 appears at positions n = 5 + 4*i; 4 appears at n = 3 + 16*i; 5 appears at n = 11 + {12,32}*i; and 7 appears at 7 + {8, 52, 128}*i. In general, if we let s=A020914(r) be the r-th possible stopping time, then A126241(n) = s for n = A122442(r) + T(r)*i, where T(r) is the r-th row of this triangle. The length of row n is A186009(n). The n-th row ends with 2^A020914(n).
The frequency of the r-th dropping time s=A020914(r) can be computed as A186009(r)/2^s. The first few frequencies are 1/2, 1/4, 1/16, 1/16, 3/128, 7/256, 3/256, 15/2048, and 85/8192.
The term "stopping time" is sometimes used instead of "dropping time", but the former usually refers to A006666.
This sequence is closely related to A177789.

Examples

			The triangle begins
2
4
16
12, 32
8, 52, 128
40, 56, 84, 136, 160, 180, 256
60, 80, 136, 220, 288, 296, 448, 528, 636, 688, 712, 1024
		

References

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

Crossrefs

A186110 Denominator of the cumulative frequency of the dropping time in the Collatz iteration.

Original entry on oeis.org

2, 4, 16, 8, 128, 256, 16, 2048, 8192, 32768, 32768, 262144, 16384, 2097152, 8388608, 16777216, 33554432, 134217728, 536870912, 1073741824, 4294967296, 4294967296, 34359738368, 137438953472, 274877906944, 137438953472, 2199023255552, 4398046511104, 4398046511104, 35184372088832
Offset: 1

Views

Author

T. D. Noe, Feb 12 2011

Keywords

Comments

The numerators are in A186109. The frequency of the n-th dropping time is A186107(n)/A186108(n).

Crossrefs

Cf. A126241 (dropping times)

Formula

a(n) = denominator of sum_{k=1..n} A186009(k) / 2^A020914(k-1).

A258033 Fractal sequence derived from A022328.

Original entry on oeis.org

0, 0, 2, 1, 0, 2, 1, 3, 0, 5, 2, 4, 1, 3, 0, 5, 2, 4, 1, 6, 3, 0, 8, 5, 2, 7, 4, 1, 6, 3, 0, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 0, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 11, 0, 8, 5, 13, 2, 10, 7, 4, 12, 1, 9, 6, 3, 11, 0, 8, 5, 13, 2, 10, 7, 4, 12, 1, 9, 6, 14, 3
Offset: 1

Views

Author

Keywords

Comments

The sequence is constructed as follows: after partitioning A022328 into segments starting with 0, in each segment the greatest term is to be deleted (see example and comment in A022328); length of k-th mentioned segment = A020914(k); respective greatest term = A056576(k);
this sequence is fractal, i.e. if the first occurrence of each n is removed, the resulting sequence is the original sequence;
A258051 is constructed from this sequence, applying the same transform as described above.

Examples

			Segments of A022328 starting with 0, deleted maxima in brackets:
.   1:  0 [1]
.   2:  0 2 1 [3]
.   3:  0 2 [4] 1 3
.   4:  0 5 2 4 1 [6] 3
.   5:  0 5 2 [7] 4 1 6 3
.   6:  0 8 5 2 7 4 1 [9] 6 3
.   7:  0 8 5 2 10 7 4 1 9 6 3 [11]
.   8:  0 8 5 2 10 7 4 [12] 1 9 6 3 11
.   9:  0 8 5 13 2 10 7 4 12 1 9 6 [14] 3 11
.  10:  0 8 5 13 2 10 7 [15] 4 12 1 9 6 14 3 11
.  11:  0 8 16 5 13 2 10 7 15 4 12 1 9 [17] 6 14 3 11
.  12:  0 8 16 5 13 2 10 18 7 15 4 12 1 9 17 6 14 3 11 [19]
.  13:  0 8 16 5 13 2 10 18 7 15 4 12 [20] 1 9 17 6 14 3 11 19
.  14:  0 8 16 5 13 21 2 10 18 7 15 4 12 20 1 9 17 6 14 [22] 3 11 19
.  15:  0 8 16 5 13 21 2 10 18 7 15 [23] 4 12 20 1 9 17 6 14 22 3 11 19
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a258033 n = a258033_list !! (n-1)
    a258033_list = 0 : f (tail a022328_list) where
       f xs = (0 : (delete (maximum ys) ys)) ++ f zs
              where (ys, (_ : zs)) = span (> 0) xs

A260593 The values of the modified Syracuse algorithm, msa, in the order in which they appear in A260590.

Original entry on oeis.org

4, 2, 7, 5, 59, 56, 8, 54, 51, 45, 42, 31, 15, 40, 21, 29, 13, 12, 20, 27, 24, 10, 16, 18, 23, 39, 81, 35, 37, 26, 80, 34, 78, 43, 32, 61, 58, 50, 48, 46, 70, 65, 69, 53, 64, 77, 73, 72, 105, 75, 67, 83, 62, 92, 135, 126, 86, 111, 129, 124, 123, 127, 88, 119, 108, 100
Offset: 1

Views

Author

Joseph K. Horn and Robert G. Wilson v, Aug 30 2015

Keywords

Comments

See A260590 for the definition of the msa.
Sorted: 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 18, 20, 21, 23, 24, 26, 27, 29, 31, 32, 34, 35, 37, 39, 40, 42, 43, 45, 46, 48, 50, 51, 53, 54, 56, 58, 59, 61, 62, 64, 65, 67, 69, 70, 72, 73, 75, 77, 78, 80, 81, 83, 85, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100, ... (A020914(n) for n>0).
Record values: 4, 7, 59, 81, 105, 135, 164, 165, 173, 176, 183, 224, 246, 287, 292, 298, 308, 376, 395, 398, 433, 447, ... .
Record last values to appear: 2, 5, 8, 10, 16, 18, 23, 26, 32, 46, 53, 62, 85, 94, 99, 102, 107, 115, 118, 130, 132, 134, 148, ... .

Examples

			Every odd number greater than 1 yields a msa value. a(1) is 4 and it corresponds to A260590(1).
a(2) is 2 since A260590(2) is 2.
a(3) is 7 since A260590(3) is 7.
a(4) is 5 since A260590(5) is 5, A260590(4) is 2 but it already appears as a(2).
		

Crossrefs

Programs

  • Mathematica
    msa[n_] := If[ OddQ@ n, (3n + 1)/2, n/2]; f[n_] := Block[{k = 2n + 1}, Length@ NestWhileList[ msa@# &, k, # >= k &] - 1]; k = 1; lst = {}; While[k < 10000001, a = f@ k; If[ !MemberQ[lst, a], AppendTo[lst, a]]; k++]; lst

A325904 Generator sequence for A100982.

Original entry on oeis.org

1, 0, -3, -8, 15, -91, -54, 2531, -17021, 43035, -66258, 1958757, -24572453, 146991979, -287482322, -3148566077, 35506973089, -198639977241, 1006345648929, -8250266425561, 76832268802555, -517564939540551, 1890772860334557, 3323588929061820, -104547561696315008, 907385094824827328, -6313246535826877248
Offset: 0

Views

Author

Benjamin Lombardo, Sep 08 2019

Keywords

Comments

The name of this sequence is derived from its main purpose as a formula for A100982 (see link). Both formulas below stem from Mike Winkler's 2017 paper on the 3x+1 problem (see below), in which a recursive definition of A100982 and A076227 is created in 2-D space. These formulas redefine the sequences in terms of this 1-D recursive sequence.

Crossrefs

Programs

  • Python
    import math
    numberOfTerms = 20
    L6 = [1,0]
    def c(n):
        return math.floor(n/(math.log2(3)-1))
    def p(a,b):
        return math.factorial(a)/(math.factorial(a-b)*math.factorial(b))
    def anotherTerm(newTermCount):
        global L6
        for a in range(newTermCount+1-len(L6)):
            y = len(L6)
            newElement = 0
            for k in range(y):
                newElement -= int(L6[k]*p(c(y)+y-k-2, c(y)-2))
            L6.append(newElement)
    anotherTerm(numberOfTerms)
    print("A325904")
    for a in range(numberOfTerms+1):
        print(a, "|", L6[a])
    
  • SageMath
    @cached_function
    def a(n):
        if n < 2: return 0^n
        A = floor(n/(log(3, 2) - 1)) - 2
        return -sum(a(k)*binomial(A + n - k, A) for k in (0..n-1))
    [a(n) for n in range(100)] # Peter Luschny, Sep 10 2019

Formula

a(0)=1, a(1)=0, a(n) = -Sum_{k=0..n-1} a(k)*binomial(A325913(n)+n-k-2, A325913(n)-2) for n>1.

A182137 Size of the set of b for numbers of the form 2^n*x + b that cannot be the smallest element of a set giving a duration of infinite flight in the Collatz problem.

Original entry on oeis.org

1, 3, 6, 13, 28, 56, 115, 237, 474, 960, 1920, 3870, 7825, 15650, 31473, 63422, 126844, 254649, 509298, 1021248, 2050541, 4101082, 8219801, 16490635, 32981270, 66071490, 132455435, 264910870, 530485275, 1060970550, 2123841570, 4253619813, 8507239626, 17027951548, 34095896991, 68191793982, 136471574881, 272943149762, 546144278026, 1093108792776, 2186217585552
Offset: 1

Views

Author

Jérôme STORTI, Apr 14 2012

Keywords

Comments

In the Collatz Problem A014682, it is possible to apply the algorithm to first degree polynomials like 2^n*x+b, where n is an integer and 0 <= b < 2^n. The iteration terminates by two cases:
1) a*x+b where a < 2^n: the polynomial is "minimized"
2) a*x+b where a is odd and a > 2^n, parity cannot be found. The polynomial cannot be minimized.
The sequence counts how many first degree polynomials end like first case for each n > 0.
The interest of this sequence is that every number that can be described by a minimized polynomial cannot be the smallest element of a set of value of T(n) = infinity.

Examples

			Example with 4x+b (0 <= b < 4):
4x is even, thus gives 2x, 2 < 4 (first case).
4x+1, is odd thus 3(4x+1)+1 = 12x+4 is even, thus (12x+4)/2/2=3x+1 3 < 4, first case.
4x+2 is even, (4x+2)/2=2x+1, 2 < 4, first case.
4x+3 with same way gives 9x+8. 9 is odd and 9 > 4, second case.
That explains why the second (n=2) term in sequence is 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{b, p0, p1, minimized = 0}, For[b = 1, b <= 2^n, b++, {p0, p1} = {b, 2^n}; While[Mod[p1, 2] == 0 && p1 >= 2^n, {p0, p1} = If[Mod[p0, 2] == 0, {p0/2, p1/2}, {3*p0+1, 3*p1}]; If[p1<2^n, minimized += 1]]]; minimized]; Table[Print[an = a[n]]; an, {n, 1, 40}] (* Jean-François Alcover, Feb 12 2014, translated from D. S. McNeil's Sage code *)
  • PARI
    upto(P=18)= my(r=Vec([1, 1], P)); forstep(x=3,2^P,4, my(s=x, p=0); until(s<=x, s= if(s%2, 3*s+1, s)/2; if(p++ > P, next(2))); if((2^p>x), r[p]++)); for(i=2, #r, r[i]+= 2*r[i-1]); print(r); \\ Ruud H.G. van Tol, Mar 13 2023
  • Sage
    def A182137(n):
        minimized = 0
        for b in range(2**n):
            p = [b, 2**n]
            while p[1] % 2 == 0 and p[1] >= 2**n:
                p[0],p[1] = [p[0]/2, p[1]/2] if p[0] % 2 == 0 else [3*p[0]+1, 3*p[1]]
            if p[1] < 2**n: minimized += 1
        return minimized # D. S. McNeil, Apr 14 2012
    

Formula

a(n) = 2^n - A076227(n) for n >= 2. - Ruud H.G. van Tol, Mar 13 2023
For n not in A020914, a(n) = 2*a(n-1). - Ruud H.G. van Tol, Apr 12 2023

Extensions

More terms from D. S. McNeil, Apr 14 2012
a(31) from Jérôme STORTI, Apr 22 2012
a(32)-a(38) from Jérôme STORTI, Jul 21 2012
a(39) from Jérôme STORTI, Jul 26 2012
a(40) from Jérôme STORTI, Feb 08 2014
a(37) and a(39) corrected by Jérôme STORTI, Dec 29 2021

A204399 Numbers k such that floor(2^k / 3^n) = 1.

Original entry on oeis.org

0, 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 18, 20, 21, 23, 24, 26, 27, 29, 31, 32, 34, 35, 37, 39, 40, 42, 43, 45, 46, 48, 50, 51, 53, 54, 56, 58, 59, 61, 62, 64, 65, 67, 69, 70, 72, 73, 75, 77, 78, 80, 81, 83, 85, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104
Offset: 0

Views

Author

Michel Lagneau, Jan 15 2012

Keywords

Comments

Presumably a(n) ~ 3*n - floor(n*sqrt(2)) = A195176(n). In the first hundred, a(n) = A195176(n) except for n = 41, 70, 82, 94 where a(n) = A195176(n) - 1.
The conjecture is false; A195176(n) - a(n) increases without bound (though not monotonically) since log_2(3) < 3 - sqrt(2). - Charles R Greathouse IV, Jan 15 2012
Basically a duplicate of A020914. - R. J. Mathar, Jan 16 2012

Crossrefs

Programs

  • Maple
    for n from 0 to 120 do : for k from 0 to 100 do: x:=floor(2^k /3^n):if x=1 then printf(`%d, `,k):else fi:od:od:
  • PARI
    a(n)=ceil(n*log(3)/log(2)) \\ Charles R Greathouse IV, Jan 15 2012

Formula

a(n) = ceiling( n * log_2(3) ). - Charles R Greathouse IV, Jan 15 2012

A333355 Number of bits in binary expansion of n minus the number of digits of n when written in base 3.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Frank Ellermann, Mar 15 2020

Keywords

Comments

Record highs are at n = 2^A054414. All n=2^k >= 2 are increases, all n=3^j are decreases, and there is either one or none 3^j between 2^(k-1) and 2^k. When one, a(2^k) = a(2^(k-1)) so not a record high. When none, a(2^k) = a(2^(k-1)) + 1 which is a record high. If 2^k and 2^(k-1) are the same length in ternary then there is no 3^j between them. This is when 2^k has most significant ternary digit 2 since 2^(k-1) >= 3^j is 2^k >= 2*3^j. These k are A054414. Non-record increases are at its complement n = 2^A020914 >= 2. - Kevin Ryde, Apr 04 2020

Examples

			a(8) = 2 = 4 - 2 for binary 1000 and ternary 22.
a(64) = 3 = 7 - 4 for binary 1000000 and ternary 2101.
		

Crossrefs

Cf. A007088 ( binary), A000523 (floor(log_2(n))), A029837.
Cf. A007089 (ternary), A062153 (floor(log_3(n))), A117966.

Programs

  • Maple
    a:= n-> ilog[2](n)-ilog[3](n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 15 2020
  • Mathematica
    a[n_]: = Floor @ Log[2, n] - Floor @ Log[3, n]; Array[a, 100] (* Amiram Eldar, Mar 16 2020 *)
  • PARI
    a(n) = logint(n,2) - logint(n,3); \\ Kevin Ryde, May 15 2020
  • Rexx
    L = 1 ;  M = 1 ;  B = 2 ;  T = 3       ;  S = 0
    do N = 2 while length( S ) < 258
       if B = N then  do    ;  B = B * 2   ;  L = L + 1   ;  end
       if T = N then  do    ;  T = T * 3   ;  M = M + 1   ;  end
       S = S || ',' L - M
    end N
    say S                   ;  return S
    

Formula

a(n) = A000523(n) - A062153(n) = floor(log_2(n)) - floor(log_3(n)).
a(n) = length(A007088(n)) - length(A007089(n)).
Previous Showing 21-29 of 29 results.