OFFSET
1,1
COMMENTS
From Klaus Purath, Aug 18 2024: (Start)
For any two consecutive terms (x,y), x^2 - 5xy + y^2 = -17 = A127147(6) always applies. In general, the following applies to all recurrences (t) with constant coefficients (5,-1) and t(0) = 2 and two consecutive terms (x,y): x^2 - 5xy + y^2 = A127147(t(1)+3) for any integer t(1). This includes and interprets the Feb 08 2014 comment on A003501 by Colin Barker.
By analogy to this, for three consecutive terms (x,y,z) of any recurrence (t) of the form (5,-1) with t(0) = 2: y^2 - xz = A127147(t(1)+3).
a(n) = t(n) - t(n-1) = (t(n+1) - t(n-2))/6, where (t) is any third order recurrence with constant coefficients (6,-6,1) and initial values t(0) = x, t(1) = x + 2, t(2) = x + 5 for any integer x.
a(n) = t(n-1) + t(n) = (t(n-2) + t(n+1))/4, where (t) is any third order recurrence with constant coefficients (4,4,-1) and initial values t(0) = x, t(1) = 2 - x, t(2) = x + 1 for any integer x. (End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-1).
FORMULA
G.f.: x*(2-7*x) / (1-5*x+x^2).
a(n) = (2^(-1-n)*((5+sqrt(21))^n*(-31+7*sqrt(21)) + (5-sqrt(21))^n*(31+7*sqrt(21)))) / sqrt(21). - Colin Barker, Nov 08 2017
a(n) = (a(n-1)^2 + 17)/a(n-2). - Klaus Purath, Aug 30 2020
MATHEMATICA
CoefficientList[Series[(2 - 7 x) / (1 - 5 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 12 2013 *)
LinearRecurrence[{5, -1}, {2, 3}, 30] (* Harvey P. Dale, Apr 06 2016 *)
PROG
(Magma) [n le 2 select n+1 else 5*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 12 2013
(PARI) Vec(x*(2 - 7*x) / (1 - 5*x + x^2) + O(x^30)) \\ Colin Barker, Nov 08 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Aug 17 2009
EXTENSIONS
Extended by R. J. Mathar, Aug 19 2009
STATUS
approved