login
A120328
Sum of three consecutive squares: a(n) = n^2 + (n + 1)^2 + (n + 2)^2.
15
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
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)
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
KEYWORD
easy,nonn
AUTHOR
Zerinvary Lajos, Jun 21 2006
STATUS
approved