OFFSET
1,2
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..1000
FORMULA
Dirichlet g.f.: Product_{n>=2} 1/(1-1/n^s)^n.
PROG
{a(n) = my(A, v, w, m);
if(
n<1, 0,
\\ define unit vector v = [1, 0, 0, ...] of length n
v = vector(n, k, k==1);
for(k=2, n,
m = #digits(n, k) - 1;
\\ expand 1/(1-x)^k out far enough
A = (1 - x)^ -k + x * O(x^m);
\\ w = zero vector of length n
w = vector(n);
\\ convert A to a vector
for(i=0, m, w[k^i] = polcoeff(A, i));
\\ build the answer
v = dirmul(v, w)
);
v[n]
)
};
\\ produce the sequence
vector(100, n, a(n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Oct 15 1999
STATUS
approved