A014817 a(n) = Sum_{k=1..n} floor(k^2/n).
1, 2, 4, 7, 9, 13, 18, 24, 29, 34, 42, 51, 57, 67, 78, 90, 97, 110, 122, 137, 149, 163, 180, 198, 211, 226, 246, 265, 281, 303, 324, 348, 365, 386, 412, 439, 457, 483, 512, 540, 561, 590, 618, 651, 679, 709, 742
Offset: 1
Examples
Row sums of the underlying triangle of floor(k^2/n), 1<=k<=n: 1; 0,2; 0,1,3; 0,1,2,4; 0,0,1,3,5; 0,0,1,2,4,6; 0,0,1,2,3,5,7; 0,0,1,2,3,4,6,8; 0,0,1,1,2,4,5,7,9; 0,0,0,1,2,3,4,6,8,10; - _R. J. Mathar_, Aug 09 2013
References
- M. Eichler and D. Zagier, The Theory of Jacobi Forms, Birkhauser, 1985, p. 103.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
Programs
-
Magma
[(&+[Floor(k^2/n): k in [1..n]]): n in [1..50]]; // G. C. Greubel, May 10 2018
-
Maple
A014817 := m->sum( floor(k^2/m), k=1..m);
-
Mathematica
Table[Sum[Floor[k^2/n],{k,n}],{n,50}] (* Harvey P. Dale, Feb 23 2015 *)
-
PARI
A014817(n)=sum(k=1,n,k^2\n) \\ M. F. Hasler, Dec 11 2010
-
PARI
a(n)=n^2-sum(m=1,n,sqrtint(n*m-1)) \\ Charles R Greathouse IV, Jun 20 2013
Formula
a(n) = n +A166375(n).
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
Comments