A164576 Integer averages of the set of the first positive squares up to some n^2.
1, 11, 20, 46, 63, 105, 130, 188, 221, 295, 336, 426, 475, 581, 638, 760, 825, 963, 1036, 1190, 1271, 1441, 1530, 1716, 1813, 2015, 2120, 2338, 2451, 2685, 2806, 3056, 3185, 3451, 3588, 3870, 4015, 4313, 4466, 4780, 4941, 5271, 5440, 5786, 5963, 6325, 6510
Offset: 1
Examples
a(1) = 1^2/1 is an integer. The average of the first two squares is (1^2+2^2)/2=5/2, not integer. The average of the first three squares is (1^2+2^2+3^2)/3=14/3, not integer. The average of the first five squares is (1^2+2^2+3^2+4^2+5^2)/ 5=11, integer, and constitutes a(2).
Links
- Zak Seidov, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Mathematica
s=0;lst={};Do[a=(s+=n^2)/n;If[Mod[a,1]==0,AppendTo[lst,a]],{n,6!}];lst Flatten[Table[{(1 + 3 k) (1 + 4 k), (1 + k) (11 + 12 k)}, {k, 0, 499}]] (* Zak Seidov, Aug 15 2012 *) Module[{nn=150,sq},sq=Range[nn]^2;Select[Table[Mean[Take[sq,n]],{n,nn}],IntegerQ]] (* or *) LinearRecurrence[{1,2,-2,-1,1},{1,11,20,46,63},50] (* Harvey P. Dale, Oct 31 2013 *)
-
PARI
a(n) = 1/4*(12*n^2 - 6*n + (-1)^n*(4*n-1) + 1) \\ Colin Barker, Dec 26 2015
Formula
G.f. ( -x*(1+10*x+7*x^2+6*x^3) ) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Jan 25 2011
a(n) = 1/4*(12*n^2 - 6*n + (-1)^n*(4*n-1) + 1). - Colin Barker, Dec 26 2015
Extensions
Edited by R. J. Mathar, Aug 20 2009
Comments