This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A222548 #60 Oct 22 2023 00:37:23 %S A222548 1,5,11,22,32,52,66,92,115,147,169,219,245,289,333,390,424,496,534, %T A222548 612,672,740,786,898,957,1037,1113,1219,1277,1413,1475,1595,1687,1791, %U A222548 1883,2056,2130,2246,2354,2526,2608,2792,2878,3040,3190,3330,3424,3662,3773 %N A222548 a(n) = Sum_{k=1..n} floor(n/k)^2. %C A222548 a(n) is the number of common divisors of integers 1<=i,j<=n over all ordered pairs (i,j). - _Geoffrey Critzer_, Jan 15 2015 %D A222548 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 98. %H A222548 Seiichi Manyama, <a href="/A222548/b222548.txt">Table of n, a(n) for n = 1..10000</a> %H A222548 MathOverflow, <a href="https://mathoverflow.net/questions/94827/the-second-moment-of-a-sum-of-floor-functions">The Second Moment of a Sum of Floor Functions</a>, 2012. %F A222548 a(n) = zeta(2)*n^2 + O(n log n). %F A222548 a(n) = 2*A024916(n) - A006218(n). - _Vaclav Kotesovec_, Sep 02 2018 %F A222548 G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k/(1 - x^k). - _Ilya Gutkovskiy_, Jul 16 2019 %F A222548 a(n) = Sum_{d=1..n} (2*d-1)*floor(n/d). [Uspensky and Heaslet] - _Michael Somos_, Feb 16 2020 %F A222548 a(n) = Sum_{k=1..n} Sum_{d|k} floor(n/d). - _Ridouane Oudra_, Jul 16 2020 %F A222548 a(n) = Sum_{i=1..n} Sum_{j=1..n} tau(gcd(i,j)). - _Ridouane Oudra_, Nov 23 2021 %t A222548 Table[Sum[Floor[n/k]^2, {k, n}], {n, 50}] (* _T. D. Noe_, Feb 26 2013 *) %t A222548 Table[nn = n;Total[Level[Table[Table[DivisorSigma[0, GCD[i, j]], {i, 1, nn}], {j, 1, nn}], {2}]], {n, 1, 49}] (* _Geoffrey Critzer_, Jan 15 2015 *) %t A222548 Table[Sum[2*DivisorSigma[1, k] - DivisorSigma[0, k], {k, 1, n}], {n, 1, 50}] (* _Vaclav Kotesovec_, Sep 02 2018 *) %o A222548 (PARI) a(n)=sum(k=1,n,(n\k)^2) %o A222548 (Magma) [&+[Floor(n/k)^2:k in [1..n] ]: n in [1..40]]; // _Marius A. Burtea_, Jul 16 2019 %o A222548 (Python) %o A222548 from math import isqrt %o A222548 def A222548(n): return -(s:=isqrt(n))**3 + sum((q:=n//k)*((k<<1)+q-1) for k in range(1,s+1)) # _Chai Wah Wu_, Oct 21 2023 %Y A222548 Cf. A013661, A018806, A024916, A153818. %Y A222548 Similar sequences for Sum_{k=1..n} floor(n/k)^m: A006218 (m=1), this sequence (m=2), A318742 (m=3), A318743 (m=4), A318744 (m=5). %K A222548 nonn %O A222548 1,2 %A A222548 _Benoit Cloitre_, Feb 24 2013