OFFSET
6,3
EXAMPLE
For a(8), we sum over the partitions of eight. For each partition p, we take binomial(Y(2,p),2): that is, the number of parts with multiplicity at least two choose 2.
8................B(0,2) = 0
7,1..............B(0,2) = 0
6,2..............B(0,2) = 0
6,1,1............B(1,2) = 0
5,3..............B(0,2) = 0
5,2,1............B(0,2) = 0
5,1,1,1..........B(1,2) = 0
4,4..............B(1,2) = 0
4,3,1............B(0,2) = 0
4,2,2............B(1,2) = 0
4,2,1,1..........B(1,2) = 0
4,1,1,1,1........B(1,2) = 0
3,3,2............B(1,2) = 0
3,3,1,1..........B(2,2) = 1
3,2,2,1..........B(1,2) = 0
3,2,1,1,1........B(1,2) = 0
3,1,1,1,1,1......B(1,2) = 0
2,2,2,2..........B(1,2) = 0
2,2,2,1,1........B(2,2) = 1
2,2,1,1,1,1......B(2,2) = 1
2,1,1,1,1,1,1....B(1,2) = 0
1,1,1,1,1,1,1,1..B(1,2) = 0
---------------------------
Total.....................3
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0 or i=1,
binomial(`if`(n>1, 1, 0)+p, 2), add(
b(n-i*j, i-1, `if`(j>1, 1, 0)+p), j=0..n/i))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=6..60); # Alois P. Heinz, May 19 2018
MATHEMATICA
Array[Total[Binomial[Count[Split@#, _?(Length@# >= 2 &)], 2] & /@IntegerPartitions[#]] &, 50]
(* Second program: *)
b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1,
Binomial[If[n > 1, 1, 0] + p, 2], Sum[
b[n-i*j, i-1, If[j>1, 1, 0]+p], {j, 0, n/i}]];
a[n_] := b[n, n, 0];
a /@ Range[6, 60] (* Jean-François Alcover, May 30 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emily Anible, May 19 2018
STATUS
approved