OFFSET
1,8
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
N. J. A. Sloane, Transforms
FORMULA
G.f.: Sum_{n>=1} a(n+2)*x^n/(1 - x^n).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n+2)/n)) = Sum_{n>=1} a(n)*x^n/n.
MAPLE
with(numtheory): P:=proc(q) local k, n, x; x:=[1, 1]: for n from 3 to q do
x:=[op(x), add(mobius((n-2)/k)*x[k], k=divisors(n-2))]; od; op(x); end:
P(75); # Paolo P. Lava, May 15 2019
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = Sum[a[d] MoebiusMu[(n - 2)/d], {d, Divisors[n - 2]}]; Table[a[n], {n, 75}]
PROG
(PARI) A318583(n) = if(n<=2, 1, sumdiv(n-2, d, moebius((n-2)/d)*A318583(d))); \\ (A non-memoized implementation) - Antti Karttunen, Aug 29 2018
(PARI)
\\ A faster implementation:
up_to = 16384;
A318583list(up_to) = { my(u=vector(up_to)); u[1] = u[2] = 1; for(n=3, up_to, u[n] = sumdiv(n-2, d, moebius((n-2)/d)*u[d])); (u); };
v318583 = A318583list(up_to);
A318583(n) = v318583[n]; \\ Antti Karttunen, Aug 29 2018
CROSSREFS
KEYWORD
sign,look
AUTHOR
Ilya Gutkovskiy, Aug 29 2018
STATUS
approved