cp's OEIS Frontend

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.

A078617 Floor(average of first n squares).

Original entry on oeis.org

1, 2, 4, 7, 11, 15, 20, 25, 31, 38, 46, 54, 63, 72, 82, 93, 105, 117, 130, 143, 157, 172, 188, 204, 221, 238, 256, 275, 295, 315, 336, 357, 379, 402, 426, 450, 475, 500, 526, 553, 581, 609, 638, 667, 697, 728, 760, 792, 825, 858, 892, 927, 963, 999, 1036, 1073
Offset: 1

Views

Author

Joseph L. Pe, Dec 10 2002

Keywords

Examples

			a(4) = floor((1 + 4 + 9 + 16)/4) = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[Mean[Range[n]^2]],{n,60}] (* Harvey P. Dale, Jun 19 2023 *)
  • PARI
    {a(n) = n++; (2 * n^2 - n) \ 6} /* Michael Somos, Dec 14 2009 */

Formula

a(n) = floor((1/n)*(Sum_{i=1..n} i^2)) = floor( A000330(n)/n ).
a(n) = [(n + 1) * (2 * n + 1) / 6]. A171662(n) = a(-1 - n). - Michael Somos, Dec 14 2009
G.f.: -x*(1+x^3+x^4+x^2) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^3 ). - R. J. Mathar, Feb 20 2011
a(n) = floor(n/(1-e^(-3/n))). Also see related exponential formula in A171662 with symmetry as above. - Richard R. Forberg, Jun 22 2013