login
A335062
a(n) = 1 - Sum_{d|n, d > 1} (-1)^d * a(n/d).
3
1, 0, 2, 0, 2, -2, 2, 0, 4, -2, 2, 0, 2, -2, 6, 0, 2, -8, 2, 0, 6, -2, 2, 0, 4, -2, 8, 0, 2, -14, 2, 0, 6, -2, 6, 4, 2, -2, 6, 0, 2, -14, 2, 0, 16, -2, 2, 0, 4, -8, 6, 0, 2, -24, 6, 0, 6, -2, 2, 8, 2, -2, 16, 0, 6, -14, 2, 0, 6, -14, 2, 0, 2, -2, 16, 0, 6, -14, 2, 0, 16
OFFSET
1,3
COMMENTS
Inverse Moebius transform of A308077.
LINKS
FORMULA
G.f. A(x) satisfies: A(x) = x / (1 - x) - Sum_{k>=2} (-1)^k * A(x^k).
MATHEMATICA
a[n_] := a[n] = 1 - DivisorSum[n, (-1)^# a[n/#] &, # > 1 &]; Table[a[n], {n, 1, 81}]
PROG
(PARI) lista(nn) = {my(va = vector(nn)); for (n=1, nn, va[n] = 1 - sumdiv(n, d, if (d>1, (-1)^d*va[n/d])); ); va; } \\ Michel Marcus, May 22 2020
CROSSREFS
Cf. A048298, A065091 (positions of 2's), A067824, A067856, A308077, A325144, A335283.
Sequence in context: A321665 A329321 A334239 * A047917 A144569 A000360
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, May 21 2020
STATUS
approved