OFFSET
0,31
COMMENTS
LINKS
Sergey Shishmintzev and Andrew Howroyd, Table of n, a(n) for n = 0..299
Sergey Shishmintzev, Scatter plot of A029931(q) vs. A000120(q) for 0 <= q < 2^10
OEIS Wiki, Empty sum
EXAMPLE
Array begins:
1,0,0,0,0,0,0,0,0,0,0,0,0,0, 0, 0, 0, 0, 0,...
0,1,1,1,1,1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1,...
0,0,0,1,1,2,2,3,3,4,4,5,5,6, 6, 7, 7, 8, 8,...
0,0,0,0,0,0,1,1,2,3,4,5,7,8,10,12,14,16,19,...
0,0,0,0,0,0,0,0,0,0,1,1,2,3, 5, 6, 9,11,15,...
0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0, 1, 1, 2, 3,...
...
T(0, 0) = 1, because there is only zero, which has no parts (n=0) and the sum with no parts is zero (k=0). Or, there is only a single q such that <n, k> = <0, 0> = <A000120(q), A029931(q)>, namely q=0.
T(1, 10) = 1, because there is only a single partition of k=10 into n=1 positive part. Or, there is only a single pair such that <n, k> = <1, 10> = <A000120(q), A029931(q)> and this pair has q=512.
T(2, 3) = 1, because there is only a single partition of k=3 into n=2 positive parts: 3 = 2 + 1. Or, for q>=0, there is only a single pair such that <n, k> = <2, 3> = <A000120(q), A029931(q)> and this pair has q=3.
T(3, 3) = 0, because we cannot decompose k=3 into 3 positive parts. Or, there is no q >= 0 such that <n, k> = <3, 3> = <A000120(q), A029931(q)>.
T(4, 15) = 6, because there are 6 partitions of 15 into 4 distinct positive parts: 15 = 6 + 4 + 3 + 2; 15 = 6 + 5 + 3 + 1; 15 = 7 + 4 + 3 + 1; 15 = 7 + 5 + 2 + 1; 15 = 8 + 4 + 2 + 1; 15 = 9 + 3 + 2 + 1. Or, there are the corresponding pairs:
MATHEMATICA
max = 14; coes = CoefficientList[ Product[1 + t*x^k, {k, 1, max}], {t, x}]; Flatten[ Table[coes[[n, k-n+1]], {k, 1, max}, {n, 1, k}]] (* Jean-François Alcover, Nov 08 2012, from given g.f. *)
PROG
(Python)import math; L = 10
def HW(x):
..if x==0: return 0
..return sum([ (x>>i)&1 for i in range(int(math.log(x, 2))+1) ])
def TW(x):
..if x==0: return 0
..return sum([ ((x>>i)&1)*(i+1) for i in range(int(math.log(x, 2))+1) ])
max_h = L+1; max_t = lambda h: L + (h-1)*h/2 + 1
T = [None] * max_h
for h in range(max_h): T[h] = [0] * max_t(h)
for i in range(2**L):
..h = HW(i); t = TW(i)
..if t < max_t(h): T[h][t] = T[h][t] + 1
for h in range(max_h):
..for t in range(max_t(h)): print T[h][t], '; ',
..print
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Sergey Shishmintzev, Oct 23 2012
STATUS
approved