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.

A384001 Irregular triangle T(n,j,k), j = 1..A024718(n), k = 1..n, where row 1 = {(0), (1)}, and row n = union of n-tuples whose sum s < n, and the n-tuples formed by appending s to the (n-1)-tuples in row n-1.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, May 21 2025

Keywords

Comments

Terms in row n are sorted lexicographically.
Row n is created by finding n-tuples w with elements from 0..n-1, taking only those w whose sums are less than n.
For example, row n = 3 contains 3-tuples w that have elements from 0..2, i.e., {(0,0,0), (0,0,1), (0,0,2), (0,1,0), (0,1,1), (0,2,0), (1,0,0), (1,0,1), (1,1,0), (2,0,0)}.
Let s be the sum of w. Then we take all elements w of row n-1 and append n-s to w to obtain certain 3-tuples with elements from 0..n whose sum s = n.
Continuing the example, row 2 = {(0,0), (0,1), (0,2), (1,0), (1,1)}, which, adding n-s to the right end gives {(0,0,3), (0,1,2), (0,2,1), (1,0,2), (1,1,1)}.
Let p_i be the i-th smallest prime divisor of N = A384000(n) (where i is not necessarily the i-th prime). Then, the terms m in row N of A162306 are of the form m = Product_{i..n} p_i^T(n,j,n-k+1). For instance, for N = 6, we have row 6 of A162306 = {1, 2, 3, 4, 6}, which is {2^0*3^0, 2^1*3^0, 2^2*3^0, 2^0*3^1, 2^1*3^1} = {1, 2, 4, 3, 6}, sorted.

Examples

			Table begins:
  1:   (0), (1);
  2:   (0, 0), (0, 1), (0, 2), (1, 0), (1, 1);
  3:   (0,0,0), (0,0,1), (0,0,2), (0,0,3), (0,1,0),
       (0,1,1), (0,1,2), (0,2,0), (0,2,1), (1,0,0),
       (1,0,1), (1,0,2), (1,1,0), (1,1,1), (2,0,0)
  etc.
Row 2 arranged as a rank 2 table, concatenating T(2,j,k), k = 1..2:
00   10   20
01   11
.
Row 3 arranged as a rank 3 table, concatenating T(3,j,k), k = 1..3:
000  001  002  003     100  101  102    200
010  011  012          110  111
020  021
		

Crossrefs

Programs

  • Mathematica
    nn = 4; w[0] = {{0}};
    Do[If[n == 1, Set[w[1], {{0}, {1}}],
      Set[w[n], Union@ Join[Select[Tuples[Range[0, n - 1], n], Total[#] < n &],
        Map[Append[#, n - Total[#]] &, w[n - 1] ] ] ] ], {n, nn}];
    Flatten@ Array[w, nn]

Formula

Length of row n = n*A024718(n).