A154245 a(n) = ( (4 + sqrt(7))^n - (4 - sqrt(7))^n )/(2*sqrt(7)).
1, 8, 55, 368, 2449, 16280, 108199, 719072, 4778785, 31758632, 211059991, 1402652240, 9321678001, 61949553848, 411701328775, 2736064645568, 18183205205569, 120841059834440, 803079631825399, 5337067516093232
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..100
- Index entries for linear recurrences with constant coefficients, signature (8,-9).
Crossrefs
Programs
-
GAP
a:=[1,8];; for n in [3..30] do a[n]:=8*a[n-1]-9*a[n-2]; od; a; # G. C. Greubel, May 21 2019
-
Magma
Z
:=PolynomialRing(Integers()); N :=NumberField(x^2-7); S:=[ ((4+r)^n-(4-r)^n)/(2*r): n in [1..20] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jan 07 2009 -
Magma
I:=[1,8]; [n le 2 select I[n] else 8*Self(n-1)-9*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 08 2016
-
Mathematica
Table[Simplify[((4+Sqrt[7])^n -(4-Sqrt[7])^n)/(2*Sqrt[7])], {n, 30}] (* or *) LinearRecurrence[{8, -9},{1, 8}, 30] (* G. C. Greubel, Sep 07 2016 *) Rest@ CoefficientList[Series[x/(1 -8x +9x^2), {x, 0, 30}], x] (* Michael De Vlieger, Sep 08 2016 *)
-
PARI
my(x='x+O('x^30)); Vec( x/(1-8*x+9*x^2) ) \\ G. C. Greubel, May 21 2019
-
Sage
[lucas_number1(n,8,9) for n in range(1, 21)] # Zerinvary Lajos, Apr 23 2009
Formula
From Philippe Deléham, Jan 06 2009: (Start)
a(n) = 8*a(n-1) - 9*a(n-2) for n > 1, with a(0)=0, a(1)=1.
G.f.: x/(1 - 8*x + 9*x^2). (End)
a(n) = b such that (3^(n-1)/2)*Integral_{x=0..Pi/2} (sin(n*x))/(4/3-cos(x)) dx = c + b*log(2). - Francesco Daddi, Aug 02 2011
E.g.f.: (1/sqrt(7))*exp(4*x)*sinh(sqrt(7)*x). - G. C. Greubel, Sep 07 2016
Extensions
Extended beyond a(7) by Klaus Brockhaus, Jan 07 2009
Edited by Klaus Brockhaus, Oct 06 2009
Comments