OFFSET
0,3
COMMENTS
a(n+1) = number of partitions p of 2n such that (number of parts of p) is a part of p, for n >=0. - Clark Kimberling, Mar 02 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = p(2*n+1)-p(2*n), where p is the partition function, A000041. - George Beck, Aug 14 2011
MAPLE
b:= proc(n, i) option remember;
if n<0 then 0
elif n=0 then 1
elif i<2 then 0
else b(n, i-1) +b(n-i, i)
fi
end:
a:= n-> b(2*n+1, 2*n+1):
seq(a(n), n=0..40); # Alois P. Heinz, Dec 01 2010
MATHEMATICA
f[n_] := Table[PartitionsP[2 k + 1] - PartitionsP[2 k], {k, 0, n}] (* George Beck, Aug 14 2011 *)
(* also *)
Table[Count[IntegerPartitions[2 n], p_ /; MemberQ[p, Length[p]]], {n, 20}] (* Clark Kimberling, Mar 02 2014 *)
b[n_, i_] := b[n, i] = Which[n<0, 0, n == 0, 1, i<2, 0, True, b[n, i-1] + b[n-i, i]]; a[n_] := b[2*n+1, 2*n+1]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Dec 01 2010
EXTENSIONS
More terms from Alois P. Heinz, Dec 01 2010
STATUS
approved