OFFSET
1,5
COMMENTS
Also number of partitions of n such that if the largest part occurs k times, then the number of parts is 2k. Example: a(8)=4 because we have [7,1], [6,2], [5,3] and [3,3,1,1].
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Sum_{k>=1} x^(3*k)/Product_{j=k..2*k} (1-x^j).
EXAMPLE
a(8)=4 because we have [4,2,2], [2,2,2,1,1], [2,2,1,1,1,1] and [2,1,1,1,1,1,1].
MAPLE
g:=sum(x^(3*k)/product(1-x^j, j=k..2*k), k=1..30): gser:=series(g, x=0, 75): seq(coeff(gser, x, n), n=1..70);
# second Maple program:
b:= proc(n, i, t) option remember: `if`(n=0, 1, `if`(i<t, 0,
b(n, i-1, t)+`if`(i>n, 0, b(n-i, i, t))))
end:
a:= n-> add(b(n-3*j, 2*j, j), j=1..n/3):
seq(a(n), n=1..64); # Alois P. Heinz, Sep 04 2017
MATHEMATICA
Table[Count[IntegerPartitions[n], p_ /; 2 Min[p] = = Max[p]], {n, 40}] (* Clark Kimberling, Feb 16 2014 *)
(* Second program: *)
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < t, 0,
b[n, i - 1, t] + If[i > n, 0, b[n - i, i, t]]]];
a[n_] := Sum[b[n - 3j, 2j, j], {j, 1, n/3}];
Array[a, 64] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
PROG
(PARI) my(N=70, x='x+O('x^N)); concat([0, 0], Vec(sum(k=1, N, x^(3*k)/prod(j=k, 2*k, 1-x^j)))) \\ Seiichi Manyama, May 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Apr 12 2006
STATUS
approved