OFFSET
1,17
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = floor(sqrt(n)) - 1 - Sum_{k=1..sqrt(n)-1} (1 - ceiling(n/k^2) + floor(n/k^2)).
EXAMPLE
a(16) = 1: floor(sqrt(16))-1 = 3 and 3^2 does not divide 16, so a(16) = 1;
a(17) = 2: floor(sqrt(17))-1 = 3 and the squares of 2 and 3 do not divide 17, so a(17) = 2.
MATHEMATICA
Table[Sum[Ceiling[n/k^2] - Floor[n/k^2], {k, Sqrt[n] - 1}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, floor(sqrt(n))-1, if (n % k^2, 1)); \\ Michel Marcus, Jan 31 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jan 30 2021
STATUS
approved