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.

A181695 Triangle read by rows: T(n,m) = number of solutions x_1 + x_2 + ... + x_k <= n, where 1 <= x_i <= m, and any k >= 1.

Original entry on oeis.org

1, 2, 3, 3, 6, 7, 4, 11, 14, 15, 5, 19, 27, 30, 31, 6, 32, 51, 59, 62, 63, 7, 53, 95, 115, 123, 126, 127, 8, 87, 176, 223, 243, 251, 254, 255, 9, 142, 325, 431, 479, 499, 507, 510, 511, 10, 231, 599, 832, 943, 991, 1011, 1019, 1022, 1023, 11, 375, 1103, 1605
Offset: 1

Views

Author

Max Alekseyev, Nov 17 2010

Keywords

Examples

			Triangle begins:
  1;
  2,   3;
  3,   6,   7;
  4,  11,  14,  15;
  5,  19,  27,  30,  31;
  6,  32,  51,  59,  62,  63;
  7,  53,  95, 115, 123, 126, 127;
  ...
Could also be extended to a square array:
  1,   1,   1,   1,   1,   1,   1, ...
  2,   3,   3,   3,   3,   3,   3, ...
  3,   6,   7,   7,   7,   7,   7, ...
  4,  11,  14,  15,  15,  15,  15, ...
  5,  19,  27,  30,  31,  31,  31, ...
  6,  32,  51,  59,  62,  63,  63, ...
  7,  53,  95, 115, 123, 126, 127, ...
		

Crossrefs

Cf. A001911 (second column), A027084 (third column), A126198.

Programs

  • PARI
    { T(n,m) = sum(i=0, n\(m+1), binomial(n-m*i,i) * (-1)^i * 2^(n-(m+1)*i) ) - 1 }

Formula

For a fixed m, generating function is 1/(1-2*x+x^(m+1)) - 1/(1-x).
T(n,m) = Sum_{i=0..floor(n/(m+1))} binomial(n-mi, i)*(-1)^i*2^(n-(m+1)i) - 1.
T(n,m) = 2^m - 1 + Sum_{j=m+1..n} A126198(j,m).