OFFSET
1,6
COMMENTS
If p is prime, a(p^k) = 0 if k is odd, 1 if k is even. - Robert Israel, Aug 01 2018
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
MAPLE
f:= n -> 1 + add(numtheory:-mobius(n/d)*procname(d), d=numtheory:-divisors(n) minus {n}):
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Aug 01 2018
MATHEMATICA
a[n_]:=1+Sum[MoebiusMu[n/d]*a[d], {d, Most[Divisors[n]]}];
Array[a, 100]
PROG
(Python)
from sympy import mobius, divisors
def A317581(n): return 1 + (0 if n == 1 else sum(mobius(n//d)*A317581(d) for d in divisors(n, generator=True) if d < n)) # Chai Wah Wu, Jan 14 2022
CROSSREFS
KEYWORD
sign,eigen
AUTHOR
Gus Wiseman, Jul 31 2018
STATUS
approved