login
This site is supported by donations to The OEIS Foundation.

 

Logo


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

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 xrange(-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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 13:50 EDT 2019. Contains 326324 sequences. (Running on oeis4.)