A087802 a(n) = Sum_{d|n, d nonprime} mu(d), where mu = A008683.
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3
Offset: 1
Keywords
Examples
Divisors of n=42: {1,2,3,6,7,14,21,42}, a(42) = mu(1) + mu(6) + mu(14) + mu(21) + mu(42) = 1+1+1+1-1 = 3.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Table[Total[MoebiusMu[#]&/@Select[Divisors[n],!PrimeQ[#]&]],{n,120}] (* Harvey P. Dale, Oct 14 2014 *)
-
PARI
A087802(n) = sumdiv(n,d,if(!isprime(d),moebius(d)))
Formula
a(n) = if n=1 then 1, else A001221(n). - Vladeta Jovovic, Oct 17 2003
Comments