OFFSET
1,2
COMMENTS
For all k <= n, add 1 if k is squarefree, otherwise add n. For n = 12, the 8 squarefree numbers less than or equal to 12 are 1, 2, 3, 5, 6, 7, 10, and 11. This leaves 4 numbers that are not squarefree, which gives a(12) = 8 + 4*12 = 56.
MATHEMATICA
Table[Sum[n^(1 - MoebiusMu[k]^2), {k, n}], {n, 80}]
PROG
(PARI) a(n) = sum(k=1, n, if (issquarefree(k), 1, n)); \\ Michel Marcus, Jun 26 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 25 2021
STATUS
approved