cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072110 a(n) = 4*a(n-1) - a(n-2) - 2, with a(0)=1, a(1)=2.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jul 30 2002

Keywords

Crossrefs

Programs

  • 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
  • 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
    
  • 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 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-3*x)/((1-x)*(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
    
  • 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
    

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)