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.
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
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, ...
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).