OFFSET
9,5
COMMENTS
With offset 12 number of partitions of n into distinct parts, where the difference between the number of odd parts and the number of even parts is -3.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 9..10000 (terms 9..1000 from Alois P. Heinz)
FORMULA
a(n) = [x^n y^3] Product_{i>=1} 1+x^i*y^(2*(i mod 2)-1).
EXAMPLE
a(20) = 2: [9,5,3,2,1], [7,5,4,3,1].
a(21) = 7: [17,3,1], [15,5,1], [13,7,1], [13,5,3], [11,9,1], [11,7,3], [9,7,5].
MAPLE
b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or
abs(t)>n, 0, `if`(n=0, 1, b(n, i-1, t)+
`if`(i>n, 0, b(n-i, i-1, t+(2*irem(i, 2)-1)))))
end:
a:= n-> b(n$2, -3):
seq(a(n), n=9..80);
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n > i(i+1)/2 || Abs[t] > n, 0, If[n == 0, 1, b[n, i-1, t] + If[i>n, 0, b[n-i, i-1, t + 2 Mod[i, 2] - 1]]]];
a[n_] := b[n, n, -3];
a /@ Range[9, 80] (* Jean-François Alcover, Dec 10 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 02 2014
STATUS
approved
