OFFSET
0,5
COMMENTS
Also (1/2)*Sum_{p in P} H(1)*H(2), where P is the set of partitions of n, and H(k) is the number of k-hooks in p.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
For n=6, we sum over the partitions of 6. For each partition, we count the parts with multiplicity at least one, and those of at least two.
6............y(1)*y(2) = 1*0 = 0
5,1..........y(1)*y(2) = 2*0 = 0
4,2..........y(1)*y(2) = 2*0 = 0
4,1,1........y(1)*y(2) = 2*1 = 2
3,3..........y(1)*y(2) = 1*1 = 1
3,2,1........y(1)*y(2) = 3*0 = 0
3,1,1,1......y(1)*y(2) = 2*1 = 2
2,2,2........y(1)*y(2) = 1*1 = 1
2,2,1,1......y(1)*y(2) = 2*2 = 4
2,1,1,1,1....y(1)*y(2) = 2*1 = 2
1,1,1,1,1,1..y(1)*y(2) = 1*1 = 1
--------------------------------
Total.........................13
MAPLE
b:= proc(n, i, x, y) option remember;
`if`(n=0, x*y, `if`(i<1, 0, add(b(n-i*j, i-1,
`if`(j>0, 1, 0)+x, `if`(j>1, 1, 0)+y), j=0..n/i)))
end:
a:= n-> b(n$2, 0$2):
seq(a(n), n=0..55); # Alois P. Heinz, Jul 30 2018
MATHEMATICA
Array[Total[
Count[Split@#, (_?(Length@# >= 1 &))] Count[
Split@#, (_?(Length@# >= 2 &))] & /@
IntegerPartitions[#]] &, 50]
(* Second program: *)
b[n_, i_, x_, y_] := b[n, i, x, y] = If[n == 0, x*y, If[i < 1, 0, Sum[b[n - i*j, i - 1, If[j > 0, 1, 0] + x, If[j > 1, 1, 0] + y], {j, 0, n/i}]]];
a[n_] := b[n, n, 0, 0];
a /@ Range[0, 55] (* Jean-François Alcover, Sep 16 2019, after Alois P. Heinz *)
PROG
(PARI) seq(n)={Vec(x*(1 + x^2 + x^3)/((1 - x)^2*(1 + x)*(1 + x + x^2)*prod(i=1, n-1, 1 - x^i + O(x^n))) + O(x^n), -n)} \\ Andrew Howroyd, Jul 15 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Emily Anible, Jul 15 2018
STATUS
approved