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

A347062 Record the number of zero terms having a following term, then the number of terms equal to 1 having a following term, then 2, 3, etc. until recording a zero, whereupon the count is reset.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Oct 16 2021

Keywords

Comments

Inventory sequence recording the number of existing terms immediately following occurrences of a zero term, then the number immediately following occurrences of 1, then 2, and so on until another zero is recorded, after which the count is reset. Inclusion of a term in any count requires it to have been followed by another term first, therefore lead terms are not included in the current count.
The scatterplot exhibits trajectories attributable to the register of occurrences of the immediately-preceding term m, c(m), and irregular periodicity of nondecreasing length. - Michael De Vlieger, Oct 16 2021
Suggested by A342585.

Examples

			At first there are no terms, thus none following a zero, so a(0) = 0.
After a(0) = 0 the count is reset, and since there are still no terms following a zero, a(1) = 0. The count is now reset again and we have one term a(1) = 0 which follows a zero term, so a(2) = 1.
We now have 0,0,1 and because no term yet follows 1, a(3) must be 0 (the lead term here is 1 but it is not counted).
The count is now reset and there are two terms (a(1) and a(2)) which follow a zero term, thus a(4) = 2; etc.
As an irregular triangle the sequence begins:
0;
0;
1, 0;
2, 1, 1, 0;
3, 3, 1, 2, 0;
4, 4, 2, 2, 2, 0;
5, 4, 5, 2, 3, 2, 0;
6, 4, 7, 3, 4, 2, 1, 1, 0;
...
		

Crossrefs

Programs

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

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 *)
Showing 1-2 of 2 results.