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.

A299779 Triangle read by rows: T(n,k) is the total number of cliques of size k in all partitions of all positive integers <= n.

Original entry on oeis.org

1, 2, 1, 5, 1, 1, 9, 3, 1, 1, 17, 5, 2, 1, 1, 28, 9, 4, 2, 1, 1, 47, 14, 7, 3, 2, 1, 1, 73, 24, 10, 6, 3, 2, 1, 1, 114, 35, 17, 9, 5, 3, 2, 1, 1, 170, 55, 25, 14, 8, 5, 3, 2, 1, 1, 253, 80, 38, 20, 13, 7, 5, 3, 2, 1, 1, 365, 118, 55, 31, 18, 12, 7, 5, 3, 2, 1, 1, 525, 167, 80, 44, 27, 17, 11, 7, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Apr 04 2018

Keywords

Comments

Column k gives the partial sums of the k-th column of triangle A197126.

Examples

			Triangle begins:
    1;
    2,   1;
    5,   1,  1;
    9,   3,  1,  1;
   17,   5,  2,  1,  1;
   28,   9,  4,  2,  1,  1;
   47,  14,  7,  3,  2,  1,  1;
   73,  24, 10,  6,  3,  2,  1,  1;
  114,  35, 17,  9,  5,  3,  2,  1,  1;
  170,  55, 25, 14,  8,  5,  3,  2,  1,  1;
  253,  80, 38, 20, 13,  7,  5,  3,  2,  1,  1;
  365, 118, 55, 31, 18, 12,  7,  5,  3,  2,  1,  1;
  525, 167, 80, 44, 27, 17, 11,  7,  5,  3,  2,  1,  1;
...
		

Crossrefs

Column 1 gives A000097.
Row sums give A014153.

Programs

  • Maple
    b:= proc(n, p, k) option remember; `if`(n=0, [1, 0], `if`(p<1, [0, 0],
          add((l->`if`(m=k, l+[0, l[1]], l))(b(n-p*m, p-1, k)), m=0..n/p)))
        end:
    T:= proc(n, k) option remember;
          b(n$2, k)[2]+`if`(nAlois P. Heinz, Apr 27 2018
  • Mathematica
    b[n_, p_, k_] := b[n, p, k] = If[n == 0, {1, 0}, If[p < 1, {0, 0}, Sum[ Function[l, If[m==k, l+{0, l[[1]]}, l]][b[n-p*m, p-1, k]], {m, 0, n/p}]]];
    T[n_, k_] := b[n, n, k][[2]] + If[n < k, 0, T[n-1, k]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 07 2019, after Alois P. Heinz *)

Formula

T(n,k) = Sum_{j=k..n} A197126(j,k).
T(2n+1,n+1) = A000041(n). - Alois P. Heinz, Apr 27 2018
Sum_{k=1..n} k * T(n,k) = A284870(n). - Alois P. Heinz, May 14 2018