|
MAPLE
|
g:= proc(n) option remember; `if`(n=0, 1, add(add(d*
2^(d-1), d=numtheory[divisors](j))*g(n-j), j=1..n)/n)
end:
b:= proc(n, i) option remember; `if`(n=0 or i=1, `if`(n>1, 0, 1),
add(b(n-i*j, i-1)*binomial(2^(i-1), j), j=0..n/i))
end:
a:= n-> add(g(n-j)*b(j$2), j=0..n):
# Maple program to compute c(n) from a(n) or a(n) from c(n).
with(numtheory):
andrews:=proc(liste) local n, z, serie, ls, i, d, aaa;
n:=nops(liste);
aaa:=liste;
serie:=listtoseries(aaa, z, ogf):
ls:=series(ln(serie), z, n);
[seq(coeff(ls, z, d), d=1..n)];
[seq(elemmobius(%, i), i=1..n-1)]
end:
swerdna:=proc(liste) local n, i, z;
n:=nops(liste);
series(convert([seq((1-z^i)^(-liste[i]), i=1..n)], `*`), z, n);
[seq(coeff(%, z, i), i=0..n-1)]
end:
elemmobius:=proc(liste, d) local k, rep;
rep:=0;
for k in divisors(d) do
rep:=rep+liste[k]*mobius(iquo(d, k))/iquo(d, k)
od;
rep
end:
# Here andrews() finds the c(n) and swerdna() finds the a(n) if the c(n) are known.
# For ordinary partitions the c(n) are [1, 1, 1, 1, 1, ...].
|