OFFSET
1,2
COMMENTS
a(n) is sum of natural numbers filled in order-n diamond.
First differences give A173962.
The unique primitive Pythagorean triple whose inradius T(n) and its long leg and hypotenuse are consecutive natural numbers is (2*T(n)+1, 2*T(n)*(T(n)+1), 2*T(n)*(T(n)+1)+1) and its semiperimeter is (T(n)+1)*(2*T(n)+1) where T(n) = A002378(n). - Miguel-Ángel Pérez García-Ortega, Jun 05 2025
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
José Miguel Blanco Casado and Miguel-Ángel Pérez García-Ortega, El Libro de las Ternas Pitagóricas.
Kival Ngaokrajang, Illustration for n = 1..6.
Eric Weisstein's World of Mathematics, Diamond.
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = 2*n^4 - 4*n^3 + 5*n^2 - 3*n + 1.
a(n) = Sum_{i = 1..(2*n*(n + 1) + 1)} i.
From Colin Barker, Jan 17 2015: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: -x*(x^2+4*x+1)*(x^2+6*x+1)/(x-1)^5. (End)
E.g.f.: -1 + exp(x)*(1 + 7*x^2 + 8*x^3 + 2*x^4). - Elmo R. Oliveira, Aug 22 2025
MATHEMATICA
Table[Sum[i, {i, 2n(n + 1) + 1}], {n, 0, 29}] (* Alonso del Arte, Feb 09 2014 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {1, 15, 91, 325, 861}, 60] (* Harvey P. Dale, Apr 21 2018 *)
a=Table[(n(n+1)), {n, 0, 29}]; Apply[Join, Map[{(#+1)(2#+1)}&, a]] (* Miguel-Ángel Pérez García-Ortega, Jun 05 2025 *)
PROG
(Small Basic)
For n = 0 to 50
a = 0
For n1 = 1 to 2*n*(n+1)+1
a = a + n1
EndFor
TextWindow.Write(a+", ")
EndFor
(PARI) Vec(-x*(x^2+4*x+1)*(x^2+6*x+1)/(x-1)^5 + O(x^100)) \\ Colin Barker, Jan 17 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Feb 08 2014
STATUS
approved
