OFFSET
1,5
FORMULA
a(n) = Sum_{k=1..n} (n-k) * mu(n-k)^2 * (ceiling(n/k) - floor(n/k)).
EXAMPLE
a(12) = 18. The numbers k that are less than 12 and do not divide 12 are: {5,7,8,9,10,11}. The corresponding n-k values are: {7,5,4,3,2,1} (only 5 of which are squarefree). The sum of the squarefree values of n-k is then 7+5+3+2+1 = 18.
MATHEMATICA
Table[Sum[(n - k) MoebiusMu[n - k]^2 (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n-1, if ((n % k) && issquarefree(n-k), n-k)); \\ Michel Marcus, Jan 03 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jan 02 2024
STATUS
approved