login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A318583
a(1) = a(2) = 1; for n > 2, a(n+2) = Sum_{d|n} mu(n/d)*a(d).
6
1, 1, 1, 0, 0, -1, -1, -2, -2, -2, -3, -2, -4, 0, -5, 1, -5, 3, -6, 7, -7, 10, -6, 13, -7, 17, -7, 21, -5, 22, -6, 31, -7, 30, -4, 35, -2, 33, -3, 39, 1, 34, 0, 42, -1, 33, 7, 39, 6, 23, 7, 32, 12, 16, 11, 18, 15, -1, 21, 4, 20, -27, 19, -21, 29, -52, 34, -56, 33, -85, 39, -80, 38, -130, 37
OFFSET
1,8
LINKS
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