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 11-17 of 17 results.

A341220 Irregular table read by rows T(n, k), n >= 0, k = 1..A341218(n); T(n, k) is the k-th number m such that A340873(m) = n.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 7, 16, 12, 14, 15, 32, 5, 24, 28, 30, 31, 64, 10, 11, 48, 56, 60, 62, 63, 128, 20, 21, 22, 23, 96, 112, 120, 124, 126, 127, 256, 13, 40, 42, 43, 44, 46, 47, 192, 224, 240, 248, 252, 254, 255, 512, 25, 26, 27, 80, 84, 85, 86, 87, 88, 92, 94, 95, 384, 448, 480, 496, 504, 508, 510, 511, 1024
Offset: 0

Views

Author

Rémy Sigrist, Feb 07 2021

Keywords

Comments

Each positive integer appears once.
For any n >= 0:
- if m appears in row n, then 2*m appears in row n+1,
- if m appears in row n and is an odious even number > 2, then an additional odd number appears in row n+1.

Examples

			Table begins:
    1;
    2;
    4;
    3, 8;
    6, 7, 16;
    12, 14, 15, 32;
    5, 24, 28, 30, 31, 64;
    10, 11, 48, 56, 60, 62, 63, 128;
    20, 21, 22, 23, 96, 112, 120, 124, 126, 127, 256;
    13, 40, 42, 43, 44, 46, 47, 192, 224, 240, 248, 252, 254, 255, 512;
    ...
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, 1) = A341194(n).
T(n, A341218(n)) = 2^n.

A375094 a(n) is the least number not occurring in a Collatz trajectory of n steps.

Original entry on oeis.org

2, 3, 3, 3, 3, 3, 3, 6, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 18, 25, 25, 25, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27
Offset: 0

Views

Author

Markus Sigg and Hugo Pfoertner, Aug 03 2024

Keywords

Comments

A006877 and A288493 form a run-length encoding of this sequence: It starts with A288493(1) copies of A006877(2), followed by A288493(2) copies of A006877(3), followed by A288493(3) copies of A006877(4), and so on.

Examples

			a(5) = 3 because there are two trajectories with 5 steps, namely (32,16,8,4,2,1) and (5,16,8,4,2,1). 3 is the smallest number not appearing in both.
		

Crossrefs

Programs

  • Python
    # output in b-file format
    from itertools import count
    n = 0
    for k in count():
        m = k
        s = 0
        while m > 1:
            m = m // 2 if m % 2 == 0 else 3*m+1
            s += 1
        while n < s:
            print(n, k, flush=True)
            n += 1

A088976 Breadth-first traversal of the Collatz tree, with the even child of each node traversed prior to its odd child. If the Collatz 3n+1 conjecture is true, this is a permutation of all positive integers.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 5, 64, 10, 128, 21, 20, 3, 256, 42, 40, 6, 512, 85, 84, 80, 13, 12, 1024, 170, 168, 160, 26, 24, 2048, 341, 340, 336, 320, 53, 52, 48, 4096, 682, 680, 113, 672, 640, 106, 104, 17, 96, 8192, 1365, 1364, 227, 1360, 226, 1344, 1280, 213, 212, 35, 208
Offset: 0

Views

Author

David Eppstein, Oct 31 2003

Keywords

Crossrefs

Cf. A127824 (terms at the same depth are sorted).

Programs

  • Python
    def A088976():
        yield 1
        for x in A088976():
            yield 2*x
            if x > 4 and x % 6 == 4:
                yield (x - 1)//3
    a = A088976(); print([next(a) for _ in range(100)])

A331272 Irregular triangle in which row n lists numbers m such that A330073(m,n) = 1.

Original entry on oeis.org

1, 5, 25, 4, 125, 20, 625, 3, 100, 104, 3125, 15, 16, 500, 520, 15625, 2, 75, 80, 83, 86, 2500, 2600, 2604, 78125, 10, 12, 13, 375, 400, 415, 416, 430, 433, 12500, 13000, 13020, 390625, 50, 60, 62, 65, 66, 69, 71, 1875, 2000, 2075, 2080, 2083, 2150, 2165, 2166, 62500, 65000, 65100, 65104, 1953125
Offset: 0

Views

Author

Davis Smith, Jan 13 2020

Keywords

Comments

The last number in row n is 5^n (A000351(n)).
For numbers m and n such that m is in row n, 5*m is in row n + 1 and if m > 10 and m == 10, 15, 20, or 25 (mod 30), then floor(m/6) is in row n + 1.
The conjecture in A330073 claims that every positive integer appears in this triangle.

Examples

			The irregular triangle starts:
0:   1
1:   5
2:  25
3:   4  125
4:  20  625
5:   3  100  104 3125
6:  15   16  500  520 15625
7:   2   75   80   83    86  2500  2600  2604 78125
8:  10   12   13  375   400   415   416   430   433 12500 13000 13020 390625
		

Crossrefs

Cf. A000351 (5^n), A127824, A330073.

Programs

  • PARI
    A331272(lim)=my(N=[1], b=-1, RC=5*[2..5]); while(bif(setsearch(RC,X%30)&&(X>RC[1]),[floor(X/6),5*X],X*5),N))[1,]))

Formula

If N is the list of numbers in row n, then the list of numbers in row n + 1 is the union of each number in N multiplied by 5 and numbers floor(x/6) where x is in N, congruent to 0 (mod 5), not congruent to 0 or 5 (mod 30), and floor(x/6) > 1.

A337673 a(n) is the sum of all positive integers whose Collatz orbit has length n.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 37, 74, 172, 344, 786, 1572, 3538, 7206, 16252, 33112, 73762, 149967, 330107, 678610, 1498356, 3082302, 6742487, 13855154, 30122440, 62388962, 135783788, 281177482, 608402189, 1259151448, 2711432766, 5646008216, 12172417990, 25339969480, 54409676729, 113159496364
Offset: 0

Views

Author

Markus Sigg, Sep 15 2020

Keywords

Comments

a(n) >= 2^(n-1) as 2^(n-1) has orbit length n.

Examples

			a(6) = 5+32 = 37 as the positive integers whose Collatz orbit has length 6 are {5,32} - the orbit of 5 is 5,16,8,4,2,1, and the orbit of 32 is 32,16,8,4,2,1.
		

Crossrefs

Equals row sums of triangles A088975 and A127824.

Programs

  • PARI
    nextSet(s) = { my(s1 = Set([])); for(i = 1, #s, s1 = setunion(s1, Set([2*s[i]])); if (s[i] > 4 && (s[i]-1) % 3 == 0 && (s[i]-1)/3 % 2 == 1, s1 = setunion(s1, Set([(s[i]-1)/3]))); ); return(s1); }
    a(n) = { my(s = Set([1])); for(k = 1, n, s = nextSet(s); ); return(sum(i=1,#s,s[i])); }

Extensions

More terms from David A. Corneth, Sep 15 2020

A355312 Irregular triangle read by rows, in which the rows list groups of consecutive integers taking the same number of halving and tripling steps to reach 1 in '3X+1' problem. Groups are in order of the number of steps required, and in numerical order among those with the same number of steps.

Original entry on oeis.org

20, 21, 12, 13, 84, 85, 52, 53, 340, 341, 34, 35, 212, 213, 226, 227, 1364, 1365, 68, 69, 70, 452, 453, 454, 22, 23, 140, 141, 150, 151, 852, 853, 908, 909, 5460, 5461, 44, 45, 46, 276, 277, 300, 301, 302, 1812, 1813, 14, 15, 92, 93, 564, 565, 604, 605, 3412, 3413
Offset: 1

Views

Author

Paul Duckett, Jun 27 2022

Keywords

Examples

			20 and 21 are terms since they both use 7 steps (trajectories 20, 10, 5, 16, 8, 4, 2, 1 and 21, 64, 32, 16, 8, 4, 2, 1).
300, 301 and 302 are terms since they all use 16 steps.
The triangle starts:
   7:  20   21
   9:  12   13   84   85
  11:  52   53  340  341
  13:  34   35  212  213  226  227 1364 1365
  14:  68   69   70  452  453  454
  15:  22   23  140  141  150  151  852  853  908  909 5460 5461
  16:  44   45   46  276  277  300  301  302 1812 1813
  17:  14   15   92   93  564  565  604  605 3412 3413
		

Crossrefs

Subtriangle of A127824.

Programs

  • PARI
    See Links section.

A177001 The number of 3x+1 steps in the Collatz iteration of A033491(n), the least number requiring n iterations.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Apr 30 2010

Keywords

Comments

It appears that a(n) is the maximum number of 3x+1 steps for all numbers requiring n Collatz iterations, which is row n of A127824.

Examples

			24 is the smallest number that requires 10 Collatz iterations. The iteration uses two 3x+1 steps to produce 24, 12, 6, 3, 10, 5, 16, 8, 4, 2, 1. Hence a(10)=2.
		

Programs

  • Mathematica
    col[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[k = 1; While[Length[(y = col[k])] - 1 != n, k++]; Count[y, ?OddQ] - 1, {n, 80}] (* _Jayanta Basu, Jul 27 2013 *)

Formula

For large n, a(n) ~ n * log(2)/log(6).
Previous Showing 11-17 of 17 results.