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 A030778 #20 Aug 06 2024 20:48:58 %S A030778 3,3,1,3,2,1,3,2,1,6,5,3,2,1,7,6,5,4,3,2,1,9,8,7,6,5,4,3,2,1,12,10,9, %T A030778 8,7,6,5,4,3,2,1,15,12,11,10,9,8,7,6,5,4,3,2,1,18,15,13,12,11,10,9,8, %U A030778 7,6,5,4,3,2,1,21,18,16,15,13,12,11,10,9,8,7 %N A030778 The second list after the following procedure: starting with a list [3] and an empty list, repeatedly add the distinct values in both lists in descending order to the second list and add the corresponding frequencies of those values to the first list. %C A030778 The length of the second row after stage k is 0, 1, 3, 6, 9, 14, 21, 30, 41, 54, 69, 86, 105, ... - Peter Kagey, Apr 09 2020 %H A030778 Peter Kagey, <a href="/A030778/b030778.txt">Table of n, a(n) for n = 1..9938</a> (First 80 stages) %e A030778 Stage 1: [ %e A030778 [3], %e A030778 [] %e A030778 ] %e A030778 Stage 2: [ %e A030778 [3, 1], %e A030778 [3] %e A030778 ] %e A030778 Stage 3: [ %e A030778 [3, 1, 2, 1], %e A030778 [3, 3, 1] %e A030778 ] %e A030778 Stage 4: [ %e A030778 [3, 1, 2, 1, 3, 1, 3], %e A030778 [3, 3, 1, 3, 2, 1] %e A030778 ] %e A030778 Stage 5: [ %e A030778 [3, 1, 2, 1, 3, 1, 3, 6, 2, 5], %e A030778 [3, 3, 1, 3, 2, 1, 3, 2, 1] %e A030778 ] %e A030778 Stage 6: [ %e A030778 [3, 1, 2, 1, 3, 1, 3, 6, 2, 5, 1, 1, 7, 4, 6], %e A030778 [3, 3, 1, 3, 2, 1, 3, 2, 1, 6, 5, 3, 2, 1] %e A030778 ] %o A030778 (Ruby) %o A030778 def a030777_list(generations) %o A030778 rows = [[3], []] %o A030778 (2..generations).each do %o A030778 new_additions = rows.flatten.uniq.sort.reverse.map do |j| %o A030778 [rows.flatten.count(j), j] %o A030778 end %o A030778 rows = rows.zip(new_additions.transpose).map { |r, n| r + n } %o A030778 end %o A030778 rows[1] %o A030778 end # _Peter Kagey_, Apr 09 2020 %Y A030778 The first row is A030777. %Y A030778 Cf. A030717. %K A030778 nonn %O A030778 1,1 %A A030778 _Clark Kimberling_