login
Number of partitions of n into parts 7k+1 and 7k+2 with at least one part of each type.
3

%I #15 Aug 16 2020 20:48:56

%S 0,0,1,1,2,2,3,3,4,6,7,9,10,12,13,15,19,22,27,30,35,38,43,50,57,67,74,

%T 85,92,103,115,130,148,165,185,202,223,246,273,306,337,376,408,449,

%U 488,539,594,654,720,784,855,928,1013,1109,1210,1326,1436,1563,1685

%N Number of partitions of n into parts 7k+1 and 7k+2 with at least one part of each type.

%H Alois P. Heinz, <a href="/A035657/b035657.txt">Table of n, a(n) for n = 1..1000</a> (first 125 terms from Robert Price)

%F G.f.: (-1 + 1/Product_{k>=0} (1 - x^(7 k + 1)))*(-1 + 1/Product_{k>=0} (1 - x^(7 k + 2))). - _Robert Price_, Aug 16 2020

%p b:= proc(n, i, t, s) option remember; `if`(n=0, t*s, `if`(i<1, 0,

%p b(n, i-1, t, s)+(h-> `if`(h in {1, 2}, add(b(n-i*j, i-1,

%p `if`(h=1, 1, t), `if`(h=2, 1, s)), j=1..n/i), 0))(irem(i, 7))))

%p end:

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

%p seq(a(n), n=1..75); # _Alois P. Heinz_, Aug 14 2020

%t nmax = 59; s1 = Range[0, nmax/7]*7 + 1; s2 = Range[0, nmax/7]*7 + 2;

%t Table[Count[IntegerPartitions[n, All, s1~Join~s2],

%t x_ /; ContainsAny[x, s1 ] && ContainsAny[x, s2 ]], {n, 1, nmax}] (* _Robert Price_, Aug 14 2020 *)

%t nmax = 59; l = Rest@CoefficientList[Series[(-1 + 1/Product[(1 - x^(7 k + 1)), {k, 0, nmax}])*(-1 + 1/Product[(1 - x^(7 k + 2)), {k, 0, nmax}]), {x, 0, nmax}], x] (* _Robert Price_, Aug 16 2020 *)

%Y Cf. A035441-A035468, A035618-A035656, A035658-A035699.

%K nonn

%O 1,5

%A _Olivier GĂ©rard_