OFFSET
1,5
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n - 1 - Sum_{k=1..n-1} (1 - ceiling(n/k^2) + floor(n/k^2)).
For n > 1, a(n) = n - 1 - tau(sqrt(n/A007913(n)) = n - A000005(sqrt(n/A007913(n)). - Chai Wah Wu, Feb 01 2021
EXAMPLE
a(7) = 5; 1^2|7, but the squares of 2,3,4,5 and 6 do not. So a(7) = 5.
a(8) = 5; 1^2|8 and 2^2|8, but the squares of 3,4,5,6,and 7 do not. So a(8) = 5.
MATHEMATICA
Table[Sum[Ceiling[n/k^2] - Floor[n/k^2], {k, n - 1}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n-1, if (n % k^2, 1)); \\ Michel Marcus, Jan 31 2021
(Python)
def A338233(n):
return 0 if n <= 1 else n-1-divisor_count(integer_nthroot(n//core(n, 2), 2)[0]) # Chai Wah Wu, Feb 01 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jan 30 2021
STATUS
approved