OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..650
Chip Curtis, Generating Heronian Triangles, The College Mathematics Journal, vol. 38 (2007), pp. 315-316. See page 316.
Index entries for linear recurrences with constant coefficients, signature (35,-35,1).
FORMULA
G.f.: -x*(1-19*x+20*x^2)/(-1+x)/(1-34*x+x^2). - R. J. Mathar, Nov 14 2007
a(1)=1, a(2)=16, a(3)=545, a(n) = 35*a(n-1)-35*a(n-2)+a(n-3). - Harvey P. Dale, Feb 10 2015
a(n) = (-6 + (963-680*sqrt(2))*(17+12*sqrt(2))^n + (17+12*sqrt(2))^(-n)*(963+680*sqrt(2)))/96. - Colin Barker, Mar 02 2016
EXAMPLE
If n=3 then a(3) = 34*a(2) - a(1) + 2 = 545 which is the third term in the sequence.
MATHEMATICA
RecurrenceTable[{a[1]==1, a[2]==16, a[n]==34a[n-1]-a[n-2]+2}, a, {n, 20}] (* or *) LinearRecurrence[{35, -35, 1}, {1, 16, 545}, 20] (* Harvey P. Dale, Feb 10 2015 *)
PROG
(PARI) Vec(x*(1-19*x+20*x^2)/((1-x)*(1-34*x+x^2)) + O(x^20)) \\ Colin Barker, Mar 02 2016
(PARI) a(n)=([0, 1, 0; 0, 0, 1; 1, -35, 35]^n*[20; 1; 16])[1, 1] \\ Charles R Greathouse IV, Aug 05 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Parthasarathy Nambi, Aug 14 2007
EXTENSIONS
Definition corrected by Rick L. Shepherd, Aug 17 2007
More terms from Harvey P. Dale, Feb 10 2015
STATUS
approved