OFFSET
0,2
COMMENTS
The Mathematica program implements the formula provided by Deleham and Brockhaus. - Harvey P. Dale, Feb 17 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..145
Index entries for linear recurrences with constant coefficients, signature (10,-18).
FORMULA
a(n) = ((5 + sqrt(7))^n + (5 - sqrt(7))^n)/2.
G.f.: (1-5*x)/(1-10*x+18*x^2). - Philippe Deléham and Klaus Brockhaus, Nov 05 2008
a(n) = (Sum_{k=0..n} A098158(n,k)*5^(2*k)*7^(n-k))/5^n. - Philippe Deléham, Nov 06 2008
E.g.f.: exp(5*x)*cosh(sqrt(7)*x). - G. C. Greubel, Jan 08 2020
MAPLE
seq(coeff(series((1-5*x)/(1-10*x+18*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Jan 08 2020
MATHEMATICA
Transpose[NestList[{#[[2]], 10#[[2]]-18#[[1]]}&, {1, 5}, 20]][[1]] (* Harvey P. Dale, Feb 17 2011 *)
LinearRecurrence[{10, -18}, {1, 5}, 30] (* Harvey P. Dale, Aug 27 2013 *)
PROG
(Magma) Z<x>:= PolynomialRing(Integers()); N<r7>:=NumberField(x^2-7); S:=[ ((5+r7)^n+(5-r7)^n)/2: n in [0..19] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Nov 05 2008
(PARI) my(x='x+O('x^30)); Vec((1-5*x)/(1-10*x+18*x^2)) \\ G. C. Greubel, Jan 08 2020
(Sage)
def A146965_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-5*x)/(1-10*x+18*x^2) ).list()
A146965_list(30) # G. C. Greubel, Jan 08 2020
(GAP) a:=[1, 5];; for n in [3..30] do a[n]:=10*a[n-1]-18*a[n-2]; od; a; # G. C. Greubel, Jan 08 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Al Hakanson (hawkuu(AT)gmail.com), Nov 03 2008
EXTENSIONS
Extended beyond a(7) by Klaus Brockhaus, Nov 05 2008
Name from Philippe Deléham and Klaus Brockhaus, Nov 05 2008
STATUS
approved