OFFSET
1,5
COMMENTS
Equal to sum of the numbers less than sqrt(n) whose square does not divide n. - Michel Marcus and Chai Wah Wu, Feb 07 2021
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(9) = 2; floor(sqrt(n)) = 3 and 2^2 does not divide 9, so a(9) = 2.
a(10) = 5; floor(sqrt(n)) = 3 and the squares of 2 and 3 do not divide 10, so a(10) = 2 + 3 = 5.
MATHEMATICA
Table[Sum[k (Ceiling[n/k^2] - Floor[n/k^2]), {k, Sqrt[n]}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, sqrtint(n), if (n % k^2, k)); \\ Michel Marcus, Jan 31 2021
(Python)
from sympy import divisor_sigma, integer_nthroot
from sympy.ntheory.factor_ import core
def A338434(n):
m = integer_nthroot(n, 2)[0]
return m*(m+1)//2-divisor_sigma(integer_nthroot(n//core(n, 2), 2)[0]) # Chai Wah Wu, Jan 31 2021
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Wesley Ivan Hurt, Jan 30 2021
STATUS
approved