[go: up one dir, main page]

login
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.
5
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,5
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.
LINKS
Michael De Vlieger, Scatterplot of a(n) for n=0..2877 (rows 0..31)
Michael De Vlieger, Labeled scatterplot of a(n) for n=0..336 (rows 0..23), with trajectory of c(0) in black, c(1) in red, c(2) in orange, c(3) in yellow, c(4) in green, c(5) in blue, and c(6) in purple.
Michael De Vlieger, Scatterplot of a(n) for n=0..39555 (rows 0..255), showing trajectories with color function as stated above.
EXAMPLE
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;
...
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 *)
CROSSREFS
Sequence in context: A357646 A185813 A300756 * A321914 A321746 A133830
KEYWORD
nonn,tabf
AUTHOR
STATUS
approved