login
a(n) = Sum_{m=2..n} floor(n/m)^2.
1

%I #17 Sep 08 2022 08:46:24

%S 0,1,2,6,7,16,17,28,34,47,48,75,76,93,108,134,135,172,173,212,231,256,

%T 257,322,332,361,384,435,436,513,514,571,598,635,658,760,761,802,833,

%U 926,927,1028,1029,1104,1165,1214,1215,1358,1372,1453,1492,1579,1580,1705,1736,1857,1900,1961,1962

%N a(n) = Sum_{m=2..n} floor(n/m)^2.

%H Robert Israel, <a href="/A330476/b330476.txt">Table of n, a(n) for n = 1..5000</a>

%e a(4) = floor(4/2)^2 + floor(4/3)^2 + floor(4/4)^2 = 6.

%p f:= proc(n) local m; add(floor(n/m)^2,m=2..n) end proc:

%p map(f, [$1..100]);

%t Table[Sum[IntegerPart[(n/m)]^2,{m,2,n}],{n,1,100}] (* _Metin Sariyar_, Dec 15 2019 *)

%o (Magma) [0] cat [&+[Floor(n/m)^2:m in [2..n]]:n in [2..60]]; // _Marius A. Burtea_, Dec 15 2019

%Y Cf. A002541, A224526.

%K nonn

%O 1,3

%A _Robert Israel_, Dec 15 2019