A330868 Number of proper divisors d of n such that n-d is squarefree.
0, 1, 1, 2, 0, 2, 1, 2, 1, 1, 1, 3, 0, 2, 2, 2, 0, 2, 0, 3, 1, 2, 1, 3, 0, 1, 1, 3, 0, 2, 1, 2, 2, 2, 2, 4, 0, 2, 2, 4, 0, 4, 1, 4, 2, 1, 1, 3, 1, 0, 1, 3, 0, 2, 0, 2, 1, 2, 1, 5, 0, 2, 2, 1, 0, 3, 1, 4, 2, 3, 1, 4, 0, 2, 2, 3, 2, 3, 1, 3, 1, 1, 1, 6, 0, 2, 2, 4, 0, 3
Offset: 1
Examples
a(11) = 1; The only proper divisor of 11 is 1 and 11-1 = 10 is squarefree. a(12) = 3; There are five proper divisors of 12: 1, 2, 3, 4, 6. Of these, we see that 12-1 = 11, 12-2 = 10 and 12-6 = 6 are squarefree, but 12-3 = 9 and 12-4 = 8 are not. a(13) = 0; The only proper divisor of 13 is 1, but 13-1 = 12 (which is not squarefree). a(14) = 2; The proper divisors of 14 are 1, 2, and 7. Of these, only 14-1 = 13 and 14-7 = 7 are squarefree.
Programs
-
Mathematica
Table[Sum[MoebiusMu[n - i]^2*(1 - Ceiling[n/i] + Floor[n/i]), {i, n - 1}], {n, 100}]
-
PARI
a(n) = sumdiv(n, d, (d
Michel Marcus, Apr 29 2020