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 A014817 #35 Sep 08 2022 08:44:39 %S A014817 1,2,4,7,9,13,18,24,29,34,42,51,57,67,78,90,97,110,122,137,149,163, %T A014817 180,198,211,226,246,265,281,303,324,348,365,386,412,439,457,483,512, %U A014817 540,561,590,618,651,679,709,742 %N A014817 a(n) = Sum_{k=1..n} floor(k^2/n). %D A014817 M. Eichler and D. Zagier, The Theory of Jacobi Forms, Birkhauser, 1985, p. 103. %H A014817 G. C. Greubel, <a href="/A014817/b014817.txt">Table of n, a(n) for n = 1..5000</a> %F A014817 a(n) = n +A166375(n). %F A014817 For prime p>2, a(p) = (p^2+2)/3 - A228131(p)/p. In particular, for prime p==1 (mod 4), a(p) = (p^2+2)/3. - _Max Alekseyev_, Aug 11 2013 %e A014817 Row sums of the underlying triangle of floor(k^2/n), 1<=k<=n: %e A014817 1; %e A014817 0,2; %e A014817 0,1,3; %e A014817 0,1,2,4; %e A014817 0,0,1,3,5; %e A014817 0,0,1,2,4,6; %e A014817 0,0,1,2,3,5,7; %e A014817 0,0,1,2,3,4,6,8; %e A014817 0,0,1,1,2,4,5,7,9; %e A014817 0,0,0,1,2,3,4,6,8,10; %e A014817 - _R. J. Mathar_, Aug 09 2013 %p A014817 A014817 := m->sum( floor(k^2/m), k=1..m); %t A014817 Table[Sum[Floor[k^2/n],{k,n}],{n,50}] (* _Harvey P. Dale_, Feb 23 2015 *) %o A014817 (PARI) A014817(n)=sum(k=1,n,k^2\n) \\ _M. F. Hasler_, Dec 11 2010 %o A014817 (PARI) a(n)=n^2-sum(m=1,n,sqrtint(n*m-1)) \\ _Charles R Greathouse IV_, Jun 20 2013 %o A014817 (Magma) [(&+[Floor(k^2/n): k in [1..n]]): n in [1..50]]; // _G. C. Greubel_, May 10 2018 %Y A014817 Cf. A177041, A166387, A166375, A165993, A227841, A227842. %K A014817 nonn,easy %O A014817 1,2 %A A014817 _N. J. A. Sloane_