OFFSET
0,4
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.
LINKS
Michael De Vlieger, Scatterplot of a(n) for n = 0..43057 (2^8 cycles), accentuating the trajectory of the records counter in red.
Michael De Vlieger, Scatterplot of a(n) for n = 0..777315 (2^10 cycles), accentuating the trajectory of the records counter in red.
Michael De Vlieger, Scatterplot of a(n) for n = 0..15009105 (2^12 cycles), accentuating the trajectory of the records counter in red.
Michael De Vlieger, Scatterplot detail of a(n) < 1152 for n = 0..43057 (2^8 cycles), enlarging the dense part of the scatterplot.
Michael De Vlieger, Scatterplot of a(n) for n = 0..43057 accentuating trajectories of the number of records in black, of 0's in red, 1's in orange, 2's in yellow, 3's in green, 4's in cyan, 5's in blue, and 6's in purple.
EXAMPLE
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;
...
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 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
David James Sycamore, Oct 07 2021
STATUS
approved