|
|
A117930
|
|
Number of partitions of 2n into factorial parts (0! not allowed, i.e., only one kind of 1 can be a part). Also number of partitions of 2n+1 into factorial parts.
|
|
2
|
|
|
1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26, 30, 36, 42, 48, 56, 64, 72, 82, 92, 102, 114, 126, 138, 153, 168, 183, 201, 219, 237, 258, 279, 300, 324, 348, 372, 400, 428, 456, 488, 520, 552, 588, 624, 660, 700, 740, 780, 825, 870, 915, 965, 1015, 1065, 1120, 1175, 1230
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 1/((1-x)*Product_{j>=2} (1 - x^(j!/2))).
|
|
EXAMPLE
|
a(3) = 5 because the partitions of 6 into factorials are [6], [2,2,2], [2,2,1,1], [2,1,1,1,1] and [1,1,1,1,1,1].
|
|
MAPLE
|
g:=1/(1-x)/product(1-x^(j!/2), j=2..7): gser:=series(g, x=0, 70): seq(coeff(gser, x, n), n=0..65);
# second Maple program
b:= proc(n, i) option remember;
`if`(n=0 or i=1, 1, b(n, i-1)+
`if`(i!>n, 0, b(n-i!, i)))
end:
a:= proc(n) local i;
for i while(i!<2*n) do od;
b(2*n, i)
end:
|
|
MATHEMATICA
|
f[n_] := Length@ IntegerPartitions[2 n, All, {1, 2, 6, 24, 120}]; Array[f, 57, 0] (* Robert G. Wilson v, Oct 02 2014 *)
b[n_, i_] := b[n, i] = If[n==0 || i==1, 1, b[n, i-1] + If[i!>n, 0, b[n-i!, i] ] ]; a[n_] := Module[{i}, For[i=1, i!<2*n, i++]; b[2*n, i]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 29 2015, after Alois P. Heinz *)
|
|
PROG
|
(Haskell)
a117930 n = p (tail a000142_list) $ 2*n where
p _ 0 = 1
p ks'@(k:ks) m | m < k = 0
| otherwise = p ks' (m - k) + p ks m
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|