%I #29 Jun 30 2021 10:53:09
%S 0,0,0,0,2,2,2,0,2,5,5,3,5,5,5,3,9,6,9,7,9,9,9,7,9,14,11,12,14,14,14,
%T 8,14,14,14,9,20,20,20,18,20,20,20,18,17,20,20,14,20,22,27,25,27,24,
%U 27,25,27,27,27,25,27,27,24,21,35,35,35,33,35,35,35,24,35,35,30,33,35,35,35,29,32,44,44,42,44,44,44,42,44,41,44,42,44,44,44,38,44,37,41,37
%N Sum of the numbers less than or equal to sqrt(n) whose square does not divide n.
%C 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
%H Felix Fröhlich, <a href="/A338434/b338434.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{k=1..floor(sqrt(n))} k * (ceiling(n/k^2) - floor(n/k^2)).
%F a(n) = floor(sqrt(n))*(floor(sqrt(n))+1)/2-sigma(sqrt(n/A007913(n)) = A000217(A000196(n))-A000203(sqrt(n/A007913(n)). - _Chai Wah Wu_, Jan 31 2021
%e a(9) = 2; floor(sqrt(n)) = 3 and 2^2 does not divide 9, so a(9) = 2.
%e a(10) = 5; floor(sqrt(n)) = 3 and the squares of 2 and 3 do not divide 10, so a(10) = 2 + 3 = 5.
%t Table[Sum[k (Ceiling[n/k^2] - Floor[n/k^2]), {k, Sqrt[n]}], {n, 100}]
%o (PARI) a(n) = sum(k=1, sqrtint(n), if (n % k^2, k)); \\ _Michel Marcus_, Jan 31 2021
%o (Python)
%o from sympy import divisor_sigma, integer_nthroot
%o from sympy.ntheory.factor_ import core
%o def A338434(n):
%o m = integer_nthroot(n,2)[0]
%o return m*(m+1)//2-divisor_sigma(integer_nthroot(n//core(n,2),2)[0]) # _Chai Wah Wu_, Jan 31 2021
%Y Cf. A000217, A000196, A000203, A007913, A338228, A338231, A338233, A338234, A338236, A338430.
%K nonn,easy
%O 1,5
%A _Wesley Ivan Hurt_, Jan 30 2021