login
A325144
a(n) = - Sum_{d | n} (-1)^d *a(d) if n != 1, a(1) = 1.
4
0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 3, 0, 1, 2, 1, 0, 3, 1, 1, 0, 2, 1, 4, 0, 1, 3, 1, 0, 3, 1, 3, 0, 1, 1, 3, 0, 1, 3, 1, 0, 8, 1, 1, 0, 2, 2, 3, 0, 1, 4, 3, 0, 3, 1, 1, 0, 1, 1, 8, 0, 3, 3, 1, 0, 3, 3, 1, 0, 1, 1, 8, 0, 3, 3, 1, 0, 8, 1, 1, 0, 3, 1
OFFSET
0,10
LINKS
FORMULA
a(4*n) = 0 for n >= 0.
a(2*n) = 0 for n <= 0.
if n is prime then a(n) = 1.
if n is squarefree then a(n) is odd (A005117).
if a(n) is even then n is not squarefree (A013929) (for n > 0).
MAPLE
a := proc(n) option remember; `if`(n = 1, 1,
-add((-1)^d*a(d), d = numtheory:-divisors(n) minus {n})) end:
seq(a(n), n = 0..86);
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Apr 19 2019
STATUS
approved