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 A332623 #16 Oct 24 2023 17:35:39 %S A332623 1,5,14,25,43,58,87,106,141,171,212,239,302,333,386,439,507,546,631, %T A332623 674,765,834,911,962,1091,1157,1246,1331,1450,1513,1666,1733,1866, %U A332623 1967,2080,2181,2373,2452,2577,2694,2883,2970,3171,3262,3437,3600,3749,3848,4107,4225 %N A332623 a(n) = Sum_{k=1..n} ceiling(n/k)^2. %F A332623 G.f.: x/(1 - x)^2 + (x/(1 - x)) * Sum_{k>=1} (2*k + 1) * x^k / (1 - x^k). %F A332623 a(n) = n + Sum_{k=1..n-1} (2*sigma(k) + d(k)). %F A332623 a(n) ~ n^2 * Pi^2 / 6. - _Vaclav Kotesovec_, Feb 20 2020 %t A332623 Table[Sum[Ceiling[n/k]^2, {k, 1, n}], {n, 1, 50}] %t A332623 Table[n + Sum[2 DivisorSigma[1, k] + DivisorSigma[0, k], {k, 1, n - 1}], {n, 1, 50}] %t A332623 nmax = 50; CoefficientList[Series[x/(1 - x)^2 + x/(1 - x) Sum[(2 k + 1) x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest %o A332623 (Magma) [&+[Ceiling(n/k)^2:k in [1..n]]:n in [1..50]]; // _Marius A. Burtea_, Feb 17 2020 %o A332623 (Python) %o A332623 from math import isqrt %o A332623 def A332623(n): return n-(s:=isqrt(n-1))**2*(s+2)+sum((q:=(n-1)//k)*((k<<1)+q+3) for k in range(1,s+1)) # _Chai Wah Wu_, Oct 24 2023 %Y A332623 Cf. A000005, A000203, A006218, A006590, A024916, A222548, A332490, A332569, A332624. %K A332623 nonn %O A332623 1,2 %A A332623 _Ilya Gutkovskiy_, Feb 17 2020