OFFSET
1,4
FORMULA
a(n) = Sum_{d|n, d<n} mu(n-d)^2, where mu is the Möbius function (A008683).
EXAMPLE
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.
MATHEMATICA
Table[Sum[MoebiusMu[n - i]^2*(1 - Ceiling[n/i] + Floor[n/i]), {i, n - 1}], {n, 100}]
PROG
(PARI) a(n) = sumdiv(n, d, (d<n) && issquarefree(n-d)); \\ Michel Marcus, Apr 29 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 28 2020
STATUS
approved