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-4 of 4 results.

A353092 Inventory sequence counting prime factors. (See comment.)

Original entry on oeis.org

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

Views

Author

David James Sycamore, Apr 22 2022

Keywords

Comments

0 and 1 are the only nonnegative integers which have no prime factors. The sequence uses this property as follows: Record the number of existing terms which have 0 prime factors, then the number having 1 prime factor, then 2, 3 and so on until reaching a number k such that there are no terms having k prime factors (counted with multiplicity). At this point record a 0 term, and restart the count.

Examples

			a(0) = 0 since at first there are no terms, hence 0 terms with 0 prime factors. The count now restarts because a 0 term has occurred.
a(1) = 1 because now there is one term (a(0)) which has no prime factor.
a(2) = 0 because there is no term with one factor. The count now restarts.
a(3) = 3 because all three prior terms have no prime factor.
a(4) = 1 since a(3) is prime, the first to occur in the sequence.
a(5) = 0 since there are no terms with 2 prime divisors. The count now restarts...
As an irregular table the sequence starts:
   0;
   1, 0;
   3, 1, 0;
   5, 2, 0;
   6, 3, 1, 0;
   8, 4, 2, 1, 0;
  10, 5, 3, 1, 0;
		

Crossrefs

Programs

Extensions

a(50) and beyond from Michael S. Branicky, Apr 22 2022

A348016 Record the number of terms with no proper divisors, then the number with one proper divisor, then two, three, etc., until reaching a zero term. After each zero term, repeat the count as before.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Sep 24 2021

Keywords

Comments

An inventory sequence counting the proper divisors of existing terms, where zero is taken to have no proper divisors (see A032741). After every occurrence of a zero term the incremental count of terms with 0,1,2,... proper divisors is repeated until another zero term is encountered.

Examples

			a(0) = 0 because at first there are no terms, therefore there are no terms with no proper divisors.
a(1) = 1 because now there is one term (a(0)) which has no proper divisors.
a(2) = 0 since there are no terms with one proper divisor.
a(3) = 3 since there are now three terms having just one proper divisor (0,1,0).
As an irregular triangle the sequence begins:
   0, 1, 0;
   3, 1, 0;
   5, 2, 0;
   6, 3, 0;
   7, 5, 0;
   8, 6, 0;
   9, 6, 4, 1, 0;
  11, 7, 2, 4, 0;
  etc.
		

Crossrefs

Programs

  • PARI
    first(n) = { t = 0; res = vector(n); l = List([1]); for(i = 2, n, for(i = #l + 1, t+1, listput(l, 0) ); res[i] = l[t + 1]; q = if(l[t + 1] == 0, 0, numdiv(l[t + 1]) - 1); for(i = #l + 1, q + 1, listput(l, 0) ); l[q + 1]++; if(res[i] == 0, t = 0 , t++ ) ); res } \\ David A. Corneth, Sep 25 2021
    
  • Python
    from sympy import divisor_count
    from collections import Counter
    def f(n): return 0 if n == 0 else divisor_count(n) - 1
    def aupton(nn):
        num, alst, inventory = 0, [0], Counter([0])
        for n in range(1, nn+1):
            c = inventory[num]
            num = 0 if c == 0 else num + 1
            alst.append(c)
            inventory.update([f(c)])
        return alst
    print(aupton(84)) # Michael S. Branicky, May 07 2023

Extensions

Data corrected and extended by David A. Corneth, Sep 25 2021

A352799 Inventory sequence of binary weights.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Apr 03 2022

Keywords

Comments

Record the number of terms with binary weight zero, then successively record those with weights 1,2,... (including in the count the weights of new terms as they are recorded), until reaching a weight w for which there are zero terms with that weight, whereupon record a zero term. Repeat.

Examples

			a(0) = 0 because at the start there are no terms, therefore zero terms with binary weight zero.
a(1) = 1 because the first term (0) has binary weight zero and there is just one such term.
a(2) = 1 since a(1) = 1 has weight 1, and there is only one term with this weight.
a(3) = 0 since there are no terms with weight 2. Reset the count to zero weight and repeat.
a(4) = 2 because now there are 2 terms (a(0), a(3)) which have weight 0. And so on.
As an irregular triangle the sequence begins:
  0;
  1,  1, 0;
  2,  3, 1, 0;
  3,  4, 2, 0;
  4,  7, 2, 1, 0;
  5,  9, 4, 1, 0;
  6, 11, 5, 2, 0;
		

Crossrefs

Programs

Extensions

a(45) and beyond from Michael S. Branicky, Apr 03 2022

A362372 Inventory of powers. Initialize the sequence with '1'. Then record the number of powers of 1 thus far, then do the same for powers of 2 (2, 4, 8, ...), powers of 3, etc. When the count is zero, do not record a zero; rather start the inventory again with the powers of 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 5, 1, 1, 7, 1, 1, 9, 1, 2, 10, 2, 2, 10, 4, 2, 1, 1, 12, 6, 2, 1, 1, 1, 1, 16, 8, 2, 2, 1, 1, 1, 1, 1, 2, 21, 12, 2, 2, 1, 1, 1, 1, 1, 2, 26, 15, 2, 2, 1, 1, 1, 1, 1, 2, 31, 18, 2, 2, 1, 1, 1, 1, 1, 2, 36, 21, 2, 2, 1, 2, 1, 1, 1
Offset: 0

Views

Author

Damon Lay, Apr 17 2023

Keywords

Comments

A variant of the inventory sequence, A342585.
The graph exhibits sharp jumps followed by a rapid decline forming a periodic hockey stick pattern. Larger-scale, near-linear structures also appear.
Periodic patterns in the relative frequency of any given number also are present. For example, perform a rolling count of the number of times 2 appears in the previous 40 entries.
Open question: will all positive integers appear in the sequence?

Examples

			As an irregular triangle, the table begins:
   1;
   1;
   2, 1;
   3, 1, 1;
   5, 1, 1;
   7, 1, 1;
   9, 1, 2;
  10, 2, 2;
  10, 4, 2, 1, 1;
  12, 6, 2, 1, 1, 1, 1;
  16, 8, 2, 2, 1, 1, 1, 1, 1, 2;
  ...
Initialize the sequence with '1'.
Powers of 1 are counted in the first column, powers of 2 in the second, powers of 3 in the third, etc.
		

Crossrefs

Cf. A342585 and similar variants thereof: A345730, A347791, A348218, A352799, A353092.

Programs

  • Python
    from collections import Counter
    from sympy import divisors, perfect_power
    def powers_in(n):
        t = perfect_power(n) # False for n == 1
        return [n] if not t else [t[0]**d for d in divisors(t[1])]
    def aupton(nn):
        num, alst, inventory = 1, [1], Counter([1])
        while len(alst) <= nn:
            c = inventory[num]
            if c == 0: num = 1
            else: num += 1; alst.append(c); inventory.update(powers_in(c))
        return alst
    print(aupton(100)) # Michael S. Branicky, May 05 2023
Showing 1-4 of 4 results.