OFFSET
1,6
MATHEMATICA
a[1] = 1; a[n_] := a[n] = -Sum[d a[d], {d, Most @ Divisors[n]}]; Table[a[n], {n, 1, 65}]
PROG
(PARI) a(n) = if (n==1, 1, -sumdiv(n, d, if (d<n, d*a(d)))); \\ Michel Marcus, Mar 11 2021
(Python)
from sympy import divisors
def A342403(n): return 1 if n == 1 else -sum(d*A342403(d) for d in divisors(n) if d < n) # Chai Wah Wu, Mar 11 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Mar 10 2021
STATUS
approved