login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
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. 14
2, 5, 14, 29, 50, 77, 110, 149, 194, 245, 302, 365, 434, 509, 590, 677, 770, 869, 974, 1085, 1202, 1325, 1454, 1589, 1730, 1877, 2030, 2189, 2354, 2525, 2702, 2885, 3074, 3269, 3470, 3677, 3890, 4109, 4334, 4565, 4802, 5045, 5294, 5549, 5810, 6077, 6350 (list; graph; refs; listen; history; text; internal format)
OFFSET

-1,1

COMMENTS

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

From Jean-Christophe Hervé, Nov 11 2015: (Start)

This sequence differs from A005918 only in the first term.

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

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).

(End)

LINKS

Jean-Christophe Hervé, Table of n, a(n) for n = -1..999

Index entries for linear recurrences with constant coefficients, signature (3,-3,1).

Index entries for two-way infinite sequences.

FORMULA

From R. J. Mathar, Aug 07 2008: (Start)

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

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

a(n) = 3*(2*n + 1) + a(n - 1) (with a(-1) = 2). - Vincenzo Librandi, Nov 13 2010

a(n) = 3*n^2 + 6*n + 5. - T. D. Noe by way of Alonso del Arte, Oct 29 2012

From Jean-Christophe Hervé, Nov 11 2015: (Start)

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

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

From Amiram Eldar, Sep 14 2022: (Start)

Sum_{n>=-1} 1/a(n) = coth(sqrt(2/3)*Pi)*Pi/(2*sqrt(6)) + 1/4.

Sum_{n>=-1} (-1)^(n+1)/a(n) = cosech(sqrt(2/3)*Pi)*Pi/(2*sqrt(6)) + 1/4. (End)

MAPLE

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

MATHEMATICA

Table[Total[Range[n, n + 2]^2], {n, -1, 45}] (* Harvey P. Dale, Jan 23 2011 *)

PROG

(Sage) [i^2+(i+1)^2+(i+2)^2 for i in range(-1, 46)] # Zerinvary Lajos, Jul 03 2008

(PARI) a(n) = n^2 + (n + 1)^2 + (n + 2)^2; \\ Altug Alkan, Nov 11 2015

(Magma) [3*n^2 + 6*n + 5 : n in [-1..50]]; // Wesley Ivan Hurt, Nov 12 2015

CROSSREFS

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

Cf. A027574, A027602.

Sequence in context: A022630 A047133 A031874 * A026011 A212393 A056358

Adjacent sequences: A120325 A120326 A120327 * A120329 A120330 A120331

KEYWORD

easy,nonn

AUTHOR

Zerinvary Lajos, Jun 21 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 3 05:56 EST 2022. Contains 358512 sequences. (Running on oeis4.)