login
A343762
a(1) = 1; a(n) = -Sum_{k=1..n} a(k/gcd(n,k)).
1
1, -2, 0, -3, 3, -5, 5, -12, 8, -12, 16, -31, 31, -55, 23, -99, 131, -184, 184, -389, 157, -528, 760, -1171, 800, -2058, 1235, -3248, 4442, -5566, 5566, -13461, 7433, -20534, 18290, -30439, 38711, -77429, 46895, -105973, 136507, -187059, 187059, -441337, 185384, -632122, 888075
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