OFFSET
1,6
COMMENTS
With offset 2 number of partitions of n, where the difference between the number of odd parts and the number of even parts is -1.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
a(9) = 3: [9], [4,2,1,1,1], [3,2,2,1,1].
a(10) = 7: [8,1,1], [7,2,1], [6,3,1], [5,4,1], [5,3,2], [4,3,3], [2,2,2,1,1,1,1].
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, -1):
seq(a(n), n=1..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, -1];
Array[a, 80] (* Jean-François Alcover, Dec 10 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 30 2014
STATUS
approved