OFFSET
1,2
FORMULA
a(1) = 1; a(n) = -Sum_{d|n} Sum_{k=1..d, gcd(d,k) = 1} a(k).
a(n) = -a(n-1) if n belongs to A006512.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = -Sum[a[k/GCD[n, k]], {k, 1, n}]; Table[a[n], {n, 1, 47}]
a[1] = 1; a[n_] := a[n] = -Sum[Sum[If[GCD[k, d] == 1, a[k], 0], {k, 1, d}], {d, Divisors[n]}]; Table[a[n], {n, 1, 47}]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 28 2021
STATUS
approved