login
A240013
Number of partitions of n, where the difference between the number of odd parts and the number of even parts is 4.
2
1, 0, 1, 1, 2, 2, 4, 4, 7, 8, 11, 14, 19, 24, 30, 40, 48, 63, 76, 98, 117, 151, 178, 227, 269, 337, 399, 496, 586, 720, 854, 1036, 1228, 1481, 1752, 2096, 2480, 2946, 3481, 4115, 4850, 5707, 6717, 7868, 9237, 10789, 12632, 14707, 17181, 19947, 23243, 26925
OFFSET
4,5
COMMENTS
With offset 8 number of partitions of n, where the difference between the number of odd parts and the number of even parts is -4.
LINKS
MAPLE
b:= proc(n, i, t) option remember; `if`(abs(t)>n, 0,
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1, t)+
`if`(i>n, 0, b(n-i, i, t+(2*irem(i, 2)-1))))))
end:
a:= n-> b(n$2, -4):
seq(a(n), n=4..80);
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[Abs[t] > n, 0, If[n == 0, 1, If[i < 1, 0, b[n, i - 1, t] + If[i > n, 0, b[n - i, i, t + 2 Mod[i, 2] - 1]]]]];
a[n_] := b[n, n, -4];
a /@ Range[4, 80] (* Jean-François Alcover, Dec 10 2020, after Alois P. Heinz *)
CROSSREFS
Column k=4 of A240009.
Sequence in context: A339404 A035944 A227134 * A050366 A332753 A027591
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 30 2014
STATUS
approved