OFFSET
1,1
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Heronian Triangle
Wikipedia, Heronian triangle
Wikipedia, Integer Triangle
Index entries for linear recurrences with constant coefficients, signature (5,-5,1).
FORMULA
a(n) = (2 + sqrt(3))^n + (2 - sqrt(3))^n + 1.
From Alejandro J. Becerra Jr., Feb 12 2021: (Start)
G.f.: x*(3*x^2 - 10*x + 5)/((1 - x)*(x^2 - 4*x + 1)).
a(n) = 5*a(n-1) - 5*a(n-2) + a(n-3). (End)
EXAMPLE
a(1) = 5; there is one Heronian triangle with perimeter 12 whose side lengths are consecutive integers, [3,4,5] and 5 is the largest side length.
a(2) = 15; there is one Heronian triangle with perimeter 42 whose side lengths are consecutive integers, [13,14,15] and 15 is the largest side length.
MATHEMATICA
Table[Expand[(2 + Sqrt[3])^n + (2 - Sqrt[3])^n + 1], {n, 40}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, May 20 2020
STATUS
approved