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.
%I A348328 #41 Jun 29 2025 15:17:15 %S A348328 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, %T A348328 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, %U A348328 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 %N 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. %C A348328 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. %C A348328 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. %C A348328 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. %H A348328 Michael De Vlieger, <a href="/A348328/b348328.txt">Table of n, a(n) for n = 0..10878</a> (rows n = 0..125, flattened.) %H A348328 Michael De Vlieger, <a href="/A348328/a348328.png">Scatterplot of a(n)</a> for n = 0..43057 (2^8 cycles), accentuating the trajectory of the records counter in red. %H A348328 Michael De Vlieger, <a href="/A348328/a348328_1.png">Scatterplot of a(n)</a> for n = 0..777315 (2^10 cycles), accentuating the trajectory of the records counter in red. %H A348328 Michael De Vlieger, <a href="/A348328/a348328_2.png">Scatterplot of a(n)</a> for n = 0..15009105 (2^12 cycles), accentuating the trajectory of the records counter in red. %H A348328 Michael De Vlieger, <a href="/A348328/a348328_3.png">Scatterplot detail of a(n) < 1152</a> for n = 0..43057 (2^8 cycles), enlarging the dense part of the scatterplot. %H A348328 Michael De Vlieger, <a href="/A348328/a348328_4.png">Scatterplot of a(n)</a> 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. %H A348328 <a href="/index/In#inventory">Index entries for sequences related to the inventory sequence</a> %e A348328 a(0) = 0 because so far no terms have been seen, hence no records. %e A348328 Following zero term a(0) we reset the count and a(1) = 1 since a(0) = 0 is a record term. %e A348328 a(2) = 1, the number of 0's seen thus far, %e A348328 a(3) = 2, the number of 1's, %e A348328 a(4) = 1 the number of 2's, %e A348328 a(5) = 0 because no 3's have been seen thus far. %e A348328 Following a(5) = 0, we reset the count and record a(6) = 3, the number of record terms (0,1,2) seen thus far. %e A348328 a(7) = 2 since at this point the 2 zero terms have been counted; etc. %e A348328 As an irregular table the sequence starts: %e A348328 0; %e A348328 1, 1, 2, 1, 0; %e A348328 3, 2, 3, 2, 2, 0; %e A348328 4, 3, 3, 4, 4, 3, 0; %e A348328 5, 4, 3, 4, 6, 5, 2, 1, 0; %e A348328 7, 5, 4, 5, 6, 6, 4, 3, 1, 0; %e A348328 8, 6, 5, 5, 7, 7, 6, 5, 3, 1, 0; %e A348328 ... %t A348328 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 *) %Y A348328 Cf. A342585, A349016, A347564. %K A348328 nonn,tabf %O A348328 0,4 %A A348328 _David James Sycamore_, Oct 07 2021