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 41-50 of 62 results. Next

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

A357943 a(0) = 0; a(1) = 1, a(2) = 2; for n > 2, a(n) is the number of times the term a(n - 1 - a(n-1)) has appeared in the sequence.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Oct 22 2022

Keywords

Comments

In the first 100 million terms the longest run of consecutive equal terms is eight : a(69)..a(76) = 12. There is no other run of equal length in this range, and it is unknown if a longer run exists.
Other than the initial three terms, the first time a term exists that is one more than the previous term is a(29) = 8, a(30) = 9. Remarkably the first time two such consecutive terms exists is not until a(60917874) = 5394, a(60917875) = 5395, a(60917876) = 5396. It is unknown if three or more such terms exist.
Note that if the sequence starts with just a(0) = 0, a(1) = 1 then the resulting sequence is A003056.
The sequence is conjectured to contain all positive numbers. See A357944 for the index of where a given number first appears.

Examples

			a(5) = 3 as the term at a(4 - a(4)) = a(4 - 1) = a(3) = 1, and 1 has appeared three times in the sequence.
		

Crossrefs

Programs

A358086 Inventory of positions ordered by odd parts of terms, as an irregular table; the first row contains 1, subsequent rows contains the 1-based positions of terms with odd part 1, followed by positions of terms with odd part 3, 5, etc. in prior rows flattened.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Oct 30 2022

Keywords

Comments

The n-th row contains A011782(n-1) terms, and is a permutation of 1..A011782(n-1).

Examples

			Table begins:
    1,
    1,
    1, 2,
    1, 2, 3, 4,
    1, 2, 3, 4, 5, 6, 8, 7,
    1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 7, 11, 14, 13, 16,
    ...
For n = 6:
the terms in rows 1..5 are: 1, 1, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 8, 7,
- terms with odd part 1 are at positions: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15,
- terms with odd part 3 are at positions: 7, 11, 14,
- terms with odd part 5 are at positions: 13,
- terms with odd part 7 are at positions: 16,
- so row 6 is: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 7, 11, 14, 13, 16.
		

Crossrefs

Programs

  • PARI
    See Links section.

A362061 a(1) = 1; for n > 1, a(n) is number of terms in the first n-1 terms of the sequence that have the same number of distinct prime factors as a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Apr 06 2023

Keywords

Comments

After 5 million terms the most common numbers for the number of distinct prime factors of the terms are 3, 2, 4, 1, and 5, although it is likely these change as n increases.
See A362062 for the indices where a term with k distinct prime factors first appears.

Examples

			a(9) = 5 as the number of distinct prime factors of a(8) = A001221(a(8)) = A001221(4) = 1, and there are five previous terms, a(3), a(5) a(6), a(7) and a(8), that have one prime factor.
a(11) = 1 as the number of distinct prime factors of a(10) = A001221(a(10)) = A001221(6) = 2, and there is only one term, a(10), that has two prime factors.
		

Crossrefs

Programs

A362077 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not yet appeared that is a multiple of Omega(a(n-1)).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 15, 14, 16, 20, 18, 21, 22, 24, 28, 27, 30, 33, 26, 32, 5, 7, 11, 13, 17, 19, 23, 25, 34, 36, 40, 44, 39, 38, 42, 45, 48, 35, 46, 50, 51, 52, 54, 56, 60, 64, 66, 57, 58, 62, 68, 63, 69, 70, 72, 55, 74, 76, 75, 78, 81, 80, 65, 82, 84, 88, 92, 87, 86, 90, 96, 102, 93
Offset: 1

Views

Author

Scott R. Shannon, Apr 08 2023

Keywords

Comments

Other than the first three terms the only other primes in the first 500000 terms are the consecutive terms a(24)..a(30) = 5, 7, 11, 13, 17, 19, 23. It is unknown if more exist.
In the same range the fixed points are 1, 2, 3, 4, and 48559, although it is possible more exist.

Examples

			a(4) = 4 as Omega(a(3)) = A001222(3) = 1, and 4 is the smallest unused number that is a multiple of 1.
a(10) = 15 as Omega(a(9)) = A001222(12) = 3, and 15 is the smallest unused number that is a multiple of 3.
		

Crossrefs

Programs

  • Python
    from sympy import primeomega
    from itertools import count, islice
    def A362077_gen(): # generator of terms
        a, b = {1,2}, 2
        yield from (1,2)
        while True:
            for b in count(p:=primeomega(b),p):
                if b not in a:
                    yield b
                    a.add(b)
                    break
    A362077_list = list(islice(A362077_gen(),20)) # Chai Wah Wu, Apr 11 2023

A366548 a(0) = 0; for n > 0, a(n) is the number of terms prior to the term a(n-1-a(n-1)) that equal a(n-1-a(n-1)).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Oct 13 2023

Keywords

Comments

In the first 10 million terms the value 4 appears the most often, 11838 times, although the count of neighboring values is less than 2% different. It is unknown if this stays the most common term as n increases. In the same range on thirty-eight occasions there are three consecutive equal terms, the first time being a(105) = a(106) = a(107) = 8. It is unknown if four or more consecutive terms eventually appear.

Examples

			a(2) = 1 as a(2-1-a(2-1)) = a(1-0) = a(1) = 0, and there is one term prior to a(1) that equals 0, namely a(0).
a(6) = 1 as a(6-1-a(6-1)) = a(5-2) = a(3) = 1, and there is one term prior to a(3) that equals 1, namely a(2).
		

Crossrefs

A366549 a(0) = 0; for n > 0, a(n) is the number of terms prior to and including the term a(n-1-a(n-1)) that equal a(n-1-a(n-1)).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Oct 13 2023

Keywords

Comments

In the first 10 million terms the value 1 appears the most often, 13584 times, although the count of neighboring values is less than 2% different. It is unknown if this stays the most common term as n increases. In the same range on fifty occasions there are three consecutive equal terms, the second time, after the three 1's at the start of the sequence, being a(406) = a(407) = a(408) = 11. It is unknown if four or more consecutive terms eventually appear.

Examples

			a(2) = 1 as a(2-1-a(2-1)) = a(1-1) = a(0) = 0, and there is one term prior to or equal to a(0) that equals 0, namely a(0).
a(6) = 3 as a(6-1-a(6-1)) = a(5-2) = a(3) = 1, and there are three terms prior to or equal to a(3) that equal 1, namely a(1), a(2) and a(3).
		

Crossrefs

A348328 Records inventory sequence: Record the number of record terms seen thus far, then the number of zero terms, then number of 1's, then 2's, etc until recording another zero term, at which point the count is repeated, as above.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Oct 07 2021

Keywords

Comments

The sequence proceeds in cycles (rows; see example) between consecutive zero terms. Each cycle starts with the number of records seen so far and then records the cardinality of 1's, 2's, etc, until reaching a number whose cardinality is zero, because it has not yet been observed in the sequence. At this point another zero is recorded, the count is reset, and repeated as above. Records may occur mid cycle (away from a zero). The first of these is 2 (count of 1's) seen in the 2nd cycle, the next is 6 (count of 3's) seen in the 5th. These become more common as the sequence progresses. The term immediately following a zero is the current number of records seen so far. It is the sum of the number of records which have occurred between zeros so far, and the number of zeros.
Initially, the number of records is itself a record, and records over the first few hundred terms are the nonnegative integers. This changes at a(435) = 29, after which the next record is 31. Although records appear at approximately one per cycle, there are cycles later which exhibit no records.
The scatter plot depicts a chaotic tangle of trajectories (cardinalities), in which the only apparent order is the appearance of quasi parallel closely set twin curves recording the cardinalities of 0 (lower), and records (upper). As n increases the upper of these curves separates further from the lower in a number of discrete steps which have not yet been explained.

Examples

			a(0) = 0 because so far no terms have been seen, hence no records.
Following zero term a(0) we reset the count and a(1) = 1 since a(0) = 0 is a record term.
a(2) = 1, the number of 0's seen thus far,
a(3) = 2, the number of 1's,
a(4) = 1 the number of 2's,
a(5) = 0 because no 3's have been seen thus far.
Following a(5) = 0, we reset the count and record a(6) = 3, the number of record terms (0,1,2) seen thus far.
a(7) = 2 since at this point the 2 zero terms have been counted; etc.
As an irregular table the sequence starts:
0;
1, 1, 2, 1, 0;
3, 2, 3, 2, 2, 0;
4, 3, 3, 4, 4, 3, 0;
5, 4, 3, 4, 6, 5, 2, 1, 0;
7, 5, 4, 5, 6, 6, 4, 3, 1, 0;
8, 6, 5, 5, 7, 7, 6, 5, 3, 1, 0;
...
		

Crossrefs

Programs

  • Mathematica
    Block[{c, k, m, r = 0}, c[-1] = 1; c[0] = 1; {0}~Join~Reap[Do[k = -1; While[IntegerQ[c[k]], Set[m, c[k]]; Sow[m]; If[IntegerQ@ c[m], c[m]++, c[m] = 1]; If[m > r, Set[r, m]; c[-1]++]; k++]; Sow[0]; c[0]++, 11]][[-1, -1]]] (* Michael De Vlieger, Oct 14 2021 *)

A358338 a(n) = abs(a(n-1) - count(a(n-1))) where count(a(n-1)) is the number of times a(n-1) has appeared so far in the sequence, a(1)=0.

Original entry on oeis.org

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

Views

Author

Clément Vovard, Nov 10 2022

Keywords

Comments

This sequence is related to the inventory sequence (A342585) as it uses the number of times a number has occurred so far in the sequence.
The following comments are only empirical observations:
ceiling(sqrt(2n)) is an excellent envelope of a(n) with no exceptions found in the first 50000 terms.
When x > 3 appears for the first time, it seems to always be preceded by a 1 and followed by x-1. Also, x-1 will already have occurred earlier in the sequence (new highest terms grow by 1).
The number of times x > 0 appears in the first k terms seems to approximately equal sqrt(2k)-x-1. Therefore, 1 appears approximately sqrt(2k) times. The highest term that has appeared in k terms is then approximately sqrt(2k), which also makes sense considering the number of times 1 appears and the fact that a new number is preceded by 1. The only exception is 0, which appears approximately sqrt(2k)/2 times.

Examples

			For n=2, a(2-1)=0 and 0 has occurred 1 time so far so a(2)=abs(0-1)=1.
For n=12, a(12-1)=1 and 1 has occurred 4 times so far so a(12)=abs(1-4)=3.
		

Crossrefs

Programs

  • Python
    from collections import Counter
    def aupton(terms):
        alst, inventory = [0], Counter([0])
        for n in range(2, terms+1):
            c = abs(alst[-1] - inventory[alst[-1]])
            alst.append(c); inventory[c] += 1
        return alst
    print(aupton(85)) # Michael S. Branicky, Nov 10 2022

A359010 Variant of the inventory sequence: Record the number of terms whose value occurs once thus far in the sequence, then the number of terms whose value occurs twice thus far, and so on; a row ends when a 0 that would repeat infinitely is reached.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Dec 11 2022

Keywords

Comments

Note that we are counting terms with repetition. For example, to find a(5)=4, we are looking for the number of terms that appear twice. 0 and 1 each occur twice, which is 2+2=4 (not 1+1=2). This means that each column contains only multiples of the number of occurrences it is counting.
A row ends when a 0 is reached as the k-th term in a row and the only value left occurring greater than or equal to k times is 0. - Neal Gersh Tolunsky, Feb 08 2025

Examples

			First few rows of irregular triangle:
  0;
  1,  0;
  1,  4,  0;
  1,  0,  3,  4,  0;
  1,  2,  0,  4,  0;
  2,  2,  6,  4,  0;
  2,  0,  0, 12,  0;
  3,  2,  0,  8,  5,  0;
  4,  2,  0,  4,  0, 12,  0;
  3,  2,  3,  8,  0,  6,  7,  0;
  2,  6,  3,  4,  5,  0,  7,  8,  0;
		

Crossrefs

Programs

  • Python
    from collections import Counter
    from itertools import count, islice
    def end_cond(I, k): # the only value left occurring >= k times is 0
        return I[0] >= k and not any(I[i] >= k for i in I if i > 0)
    def agen(): # generator of terms
        I = Counter()
        while True:
            for i in count(1):
                c = sum(v for v in I.values() if v==i)
                yield c
                I[c] += 1
                if c == 0 and end_cond(I, i):
                    break
    print(list(islice(agen(), 86))) # Michael S. Branicky, Jan 28 2025
Previous Showing 41-50 of 62 results. Next