login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A072110
a(n) = 4*a(n-1) - a(n-2) - 2, with a(0)=1, a(1)=2.
3
1, 2, 5, 16, 57, 210, 781, 2912, 10865, 40546, 151317, 564720, 2107561, 7865522, 29354525, 109552576, 408855777, 1525870530, 5694626341, 21252634832, 79315912985, 296011017106, 1104728155437, 4122901604640, 15386878263121
OFFSET
0,2
FORMULA
a(n) = A071954(n)/2 = A001353(n) + 1.
From G. C. Greubel, Feb 25 2019: (Start)
G.f.: (1-3*x)/((1-x)*(1-4*x+x^2))
a(n) = 5*a(n-1) - 5*a(n-2) + a(n-3).
a(n) = 1 - (-i)^(n+1)*F(n, 4*i), where i = sqrt(-1) and F(n,x) is the Fibonacci polynomial. (End)
MATHEMATICA
a[0]=1; a[1]=2; a[n_]:=a[n] =4*a[n-1]-a[n-2] -2; Table[a[n], {n, 0, 25}]
LinearRecurrence[{5, -5, 1}, {1, 2, 5}, 30] (* G. C. Greubel, Feb 25 2019 *)
PROG
(Sage) [lucas_number1(n, 4, 1)+1 for n in range(26)] # Zerinvary Lajos, Jul 06 2008
(Sage) ((1-3*x)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
(PARI) my(x='x+O('x^30)); Vec((1-3*x)/((1-x)*(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
(Magma) I:=[1, 2, 5]; [n le 3 select I[n] else 5*Self(n-1) -5*Self(n-2) + Self(n-3): n in [1..30]]; // G. C. Greubel, Feb 25 2019
(GAP) a:=[1, 2, 5];; for n in [4..30] do a[n]:=5*a[n-1]-5*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Feb 25 2019
CROSSREFS
Sequence in context: A082789 A234278 A180678 * A323229 A197158 A188314
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jul 30 2002
STATUS
approved