OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
FORMULA
G.f.: x + Sum_{n>=1} (-1)^n * a(n) * x^(2*n) / (1 - x^n).
MAPLE
a:= proc(n) option remember; `if`(n<2, 1,
add((-1)^d*a(d), d=numtheory[divisors](n) minus {n}))
end:
seq(a(n), n=1..70); # Alois P. Heinz, Apr 12 2021
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Sum[If[d < n, (-1)^d a[d], 0], {d, Divisors[n]}]; Table[a[n], {n, 70}]
PROG
(PARI)
memoA343370 = Map();
A343370(n) = if(1==n, 1, my(v); if(mapisdefined(memoA343370, n, &v), v, v = sumdiv(n, d, if(d<n, ((-1)^d)*A343370(d), 0)); mapput(memoA343370, n, v); (v))); \\ Antti Karttunen, Jan 02 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 12 2021
EXTENSIONS
Data section extended up to a(81) by Antti Karttunen, Jan 02 2023
STATUS
approved