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.

A347316 Irregular triangle read by rows: T(n,k) = number of times k appears in n-th row of A342585, n >= 0.

Original entry on oeis.org

1, 1, 2, 1, 0, 3, 1, 2, 1, 1, 1, 1, 1, 0, 0, 4, 1, 2, 1, 0, 1, 2, 1, 1, 2, 0, 2, 0, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 0, 2, 2, 0, 1, 2, 0, 1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 2, 0, 0, 2, 0, 2, 1, 1, 1, 2, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Sep 09 2021

Keywords

Examples

			Triangle begins:
1,
1,2,
1,0,3,
1,2,1,1,1,
1,1,0,0,4,
1,2,1,0,1,2,1,
...
Row 4 of A342585 is [4, 4, 4, 1, 4, 0], containing one 0, one 1, and four 4's; so row 4 here is [1, 1, 0, 0, 4].
		

Crossrefs

Cf. A342585, A347299 (row sums).

Programs

  • Mathematica
    Block[{c, k, m, nn = 12}, c[0] = 1; Join[{{1}}, Map[Function[w, {1}~Join~Array[If[ListQ[#], Length[#], 0] &@ Lookup[w, #] &, Max@ Keys[w]]]@ KeySort@ PositionIndex[#] &, SplitBy[Reap[Do[k = 0; While[IntegerQ[c[k]], Set[m, c[k]]; Sow[m]; If[IntegerQ@ c[m], c[m]++, c[m] = 1]; k++]; Sow[0]; c[0]++, nn]][[-1, -1]], # == 0 &][[1 ;; -1 ;; 2]]]] ] // Flatten (* Michael De Vlieger, Oct 12 2021 *)

Extensions

More terms from Alois P. Heinz, Sep 09 2021