OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,1,-2,1)
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
EXAMPLE
a(4) = floor((1 + 4 + 9 + 16)/4) = 7.
MATHEMATICA
Table[Floor[Mean[Range[n]^2]], {n, 60}] (* Harvey P. Dale, Jun 19 2023 *)
PROG
(PARI) {a(n) = n++; (2 * n^2 - n) \ 6} /* Michael Somos, Dec 14 2009 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Dec 10 2002
STATUS
approved