OFFSET
1,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
Multiplicative with a(p^e) = 1 - p is e = 1, p^2 - p if e = 2, and 0 otherwise. - Amiram Eldar, Nov 19 2021
MATHEMATICA
f[p_, e_] := Which[e > 2, 0, e == 2, p^2 - p, e == 1, 1 - p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 19 2021 *)
PROG
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Nov 18 2021
STATUS
approved