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”).

A342403
a(1) = 1; a(n) = -Sum_{d|n, d < n} d * a(d).
1
1, -1, -1, 1, -1, 4, -1, -3, 2, 6, -1, -24, -1, 8, 7, 21, -1, -38, -1, -58, 9, 12, -1, 288, 4, 14, -16, -108, -1, -180, -1, -315, 13, 18, 11, 930, -1, 20, 15, 1126, -1, -314, -1, -256, -116, 24, -1, -6960, 6, -154, 19, -354, -1, 1078, 15, 2940, 21, 30, -1, 6664, -1, 32, -198, 9765, 17
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