login
Number of partitions of n, where the difference between the number of odd parts and the number of even parts is 3.
2

%I #11 Dec 10 2020 17:35:44

%S 1,0,1,1,2,2,4,4,6,8,10,14,17,23,27,38,43,59,69,91,106,139,162,207,

%T 245,306,364,449,534,650,778,934,1117,1334,1592,1887,2251,2652,3155,

%U 3705,4391,5139,6075,7086,8347,9720,11406,13252,15505,17978,20965,24272

%N Number of partitions of n, where the difference between the number of odd parts and the number of even parts is 3.

%C With offset 6 number of partitions of n, where the difference between the number of odd parts and the number of even parts is -3.

%H Alois P. Heinz, <a href="/A240012/b240012.txt">Table of n, a(n) for n = 3..1000</a>

%p b:= proc(n, i, t) option remember; `if`(abs(t)>n, 0,

%p `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, t)+

%p `if`(i>n, 0, b(n-i, i, t+(2*irem(i, 2)-1))))))

%p end:

%p a:= n-> b(n$2, -3):

%p seq(a(n), n=3..80);

%t 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]]]]];

%t a[n_] := b[n, n, -3];

%t a /@ Range[3, 80] (* _Jean-François Alcover_, Dec 10 2020, after _Alois P. Heinz_ *)

%Y Column k=3 of A240009.

%K nonn

%O 3,5

%A _Alois P. Heinz_, Mar 30 2014