This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A120328 Sum of three consecutive squares: a(n) = n^2 + (n + 1)^2 + (n + 2)^2. 13

%I

%S 2,5,14,29,50,77,110,149,194,245,302,365,434,509,590,677,770,869,974,

%T 1085,1202,1325,1454,1589,1730,1877,2030,2189,2354,2525,2702,2885,

%U 3074,3269,3470,3677,3890,4109,4334,4565,4802,5045,5294,5549,5810,6077,6350

%N Sum of three consecutive squares: a(n) = n^2 + (n + 1)^2 + (n + 2)^2.

%C A rectangular prism with sides n, n + 1, and n + 2 will have four diagonals of different lengths. The sum of the squares of all four is three times the numbers in this sequence beginning with 14 (third term in the sequence for n = 1). - _J. M. Bergot_, Sep 15 2011

%C From _Jean-Christophe Hervé_, Nov 11 2015: (Start)

%C This sequence differs from A005918 only in the first term.

%C a(n) is also defined for any negative number and a(-n) = a(n-2).

%C If a 2-set Y and a 3-set Z are disjoint subsets of an n-set (n >= 5) X then a(n-5) is the number of 4-subsets of X intersecting both Y and Z (from comment in A005918 by _Milan Janjic_, Sep 08 2007).

%C (End)

%H Jean-Christophe Hervé, <a href="/A120328/b120328.txt">Table of n, a(n) for n = -1..999</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>

%F From _R. J. Mathar_, Aug 07 2008: (Start)

%F a(n) = A005918(n + 1), n >= 0.

%F O.g.f.: (2 - x + 5*x^2)/(x*(1 - x)^3). (End)

%F a(n) = 3*(2*n + 1) + a(n - 1) (with a(-1) = 2). - _Vincenzo Librandi_, Nov 13 2010

%F a(n) = 3*n^2 + 6*n + 5. - _T. D. Noe_ by way of _Alonso del Arte_, Oct 29 2012

%F From _Jean-Christophe Hervé_, Nov 11 2015: (Start)

%F a(n) = 3*(n + 1)^2 + 2 == 2 (mod 3), hence a(n) is never square.

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for all n in Z. (End)

%p [seq(n^2+(n+1)^2+(n+2)^2, n=-1..45)];

%t Table[Total[Range[n, n + 2]^2], {n, -1, 45}] (* _Harvey P. Dale_, Jan 23 2011 *)

%o (Sage) [i^2+(i+1)^2+(i+2)^2 for i in xrange(-1,46)] # _Zerinvary Lajos_, Jul 03 2008

%o (PARI) a(n) = n^2 + (n + 1)^2 + (n + 2)^2; \\ _Altug Alkan_, Nov 11 2015

%o (MAGMA) [3*n^2 + 6*n + 5 : n in [-1..50]]; // _Wesley Ivan Hurt_, Nov 12 2015

%Y Cf. A001844, A005918, A027575, A027578, A027865.

%Y Cf. A027574, A027602.

%K easy,nonn

%O -1,1

%A _Zerinvary Lajos_, Jun 21 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 20 21:12 EDT 2019. Contains 327247 sequences. (Running on oeis4.)