OFFSET
1,1
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = n*(4*n^2 + 15*n + 17)/3.
G.f.: ( 2*x*(6-3*x+x^2) ) / ( (x-1)^4 ). - R. J. Mathar, Aug 23 2011
a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4). - Vincenzo Librandi, Jul 04 2012
a(n) = 2*(A002412(n+1) - 1). - Hugo Pfoertner, Oct 22 2024
EXAMPLE
The perimeters of the first five triangles produced by pairs (1,2), (2,3), (3,4), (4,5), (5,6) are in order 12, 30, 56, 90, 132 with sum 320.
From the formula, a(5) = 5*(4*5^2 + 15*5 + 17)/3 = 320.
MATHEMATICA
CoefficientList[Series[(2*(6-3*x+x^2))/((x-1)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Jul 04 2012 *)
LinearRecurrence[{4, -6, 4, -1}, {12, 42, 98, 188}, 40] (* Harvey P. Dale, Oct 29 2022 *)
PROG
(Magma) I:=[12, 42, 98, 188]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 04 2012
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
J. M. Bergot, Jul 15 2011
STATUS
approved