A327594 Number of parts in all twice partitions of n.
0, 1, 5, 14, 44, 100, 274, 581, 1417, 2978, 6660, 13510, 29479, 58087, 120478, 236850, 476913, 916940, 1812498, 3437043, 6657656, 12512273, 23780682, 44194499, 83117200, 152837210, 283431014, 517571202, 949844843, 1719175176, 3127751062, 5618969956, 10133425489
Offset: 0
Keywords
Examples
a(2) = 5 = 1+2+2 counting the parts in 2, 11, 1|1. a(3) = 14 = 1+2+3+2+3+3: 3, 21, 111, 2|1, 11|1, 1|1|1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..3200
Programs
-
Maple
g:= proc(n) option remember; (p-> [p(n), add(p(n-j)* numtheory[tau](j), j=1..n)])(combinat[numbpart]) end: b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<2, 0, b(n, i-1)) +(h-> (f-> f +[0, f[1]* h[2]/h[1]])(b(n-i, min(n-i, i))*h[1]))(g(i))) end: a:= n-> b(n$2)[2]: seq(a(n), n=0..37); # second Maple program: b:= proc(n, i, k) option remember; `if`(n=0, [1, 0], `if`(k=0, [1, 1], `if`(i<2, 0, b(n, i-1, k))+ (h-> (f-> f +[0, f[1]*h[2]/h[1]])(h[1]* b(n-i, min(n-i, i), k)))(b(i$2, k-1)))) end: a:= n-> b(n$2, 2)[2]: seq(a(n), n=0..37);
-
Mathematica
b[n_, i_, k_] := b[n, i, k] = If[n == 0, {1, 0}, If[k == 0, {1, 1}, If[i < 2, 0, b[n, i - 1, k]] + Function[h, Function[f, f + {0, f[[1]] h[[2]]/ h[[1]]}][h[[1]] b[n - i, Min[n - i, i], k]]][b[i, i, k - 1]]]]; a[n_] := b[n, n, 2][[2]]; a /@ Range[0, 37] (* Jean-François Alcover, Dec 05 2020, after Alois P. Heinz *)