OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
a(n+1) = 3*a(n) + 2*sqrt(2*a(n)*(a(n) - 14)) - 14.
From Colin Barker, Jul 21 2016: (Start)
a(n) = (14+(9-4*sqrt(2))*(3+2*sqrt(2))^n + (3-2*sqrt(2))^n*(9+4*sqrt(2)))/2.
a(n) = 7*a(n-1) -7*a(n-2) +a(n-3) for n>3.
G.f.: 2*x*(9-31*x+8*x^2) / ((1-x)*(1-6*x+x^2)). (End)
MATHEMATICA
NestList[3 # + 2 Sqrt[2 # (# - 14)] - 14 &, 18, 18] (* Michael De Vlieger, Jul 19 2016 *)
CoefficientList[Series[2*x*(9-31*x+8*x^2)/((1-x)*(1-6*x+x^2)), {x, 0, 50}], x] (* G. C. Greubel, Sep 30 2018 *)
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; 1, -7, 7]^(n-1)*[18; 64; 338])[1, 1] \\ Charles R Greathouse IV, Jul 20 2016
(PARI) Vec(2*x*(9-31*x+8*x^2)/((1-x)*(1-6*x+x^2)) + O(x^30)) \\ Colin Barker, Jul 21 2016
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(2*x*(9-31*x+8*x^2)/((1-x)*(1-6*x+x^2)))); // G. C. Greubel, Sep 30 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Manuel López Holgueras, Jul 18 2016
STATUS
approved