login
Sum of the squares less than n that do not divide n.
1

%I #5 Jan 06 2024 23:21:29

%S 0,0,0,0,4,4,4,0,4,13,13,9,13,13,13,9,29,20,29,25,29,29,29,25,29,54,

%T 45,50,54,54,54,34,54,54,54,41,90,90,90,86,90,90,90,86,81,90,90,70,90,

%U 114,139,135,139,130,139,135,139,139,139,135,139,139,130,119,203

%N Sum of the squares less than n that do not divide n.

%F a(n) = Sum_{k=1..n} k * c(k) * (ceiling(n/k) - floor(n/k)), where c = A010052.

%e a(17) = 29 since the sum of the squares less than 17 that do not divide 17 is 4 + 9 + 16 = 29.

%t Table[Sum[k*(Floor[Sqrt[k]] - Floor[Sqrt[k - 1]]) (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]

%Y Cf. A000290, A010052, A338236.

%K nonn,easy

%O 1,5

%A _Wesley Ivan Hurt_, Jan 06 2024