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.

A226308 a(n) = a(n-1) + a(n-2) + 2*a(n-3) with a(0)=2, a(1)=1, a(2)=5.

Original entry on oeis.org

2, 1, 5, 10, 17, 37, 74, 145, 293, 586, 1169, 2341, 4682, 9361, 18725, 37450, 74897, 149797, 299594, 599185, 1198373, 2396746, 4793489, 9586981, 19173962, 38347921, 76695845, 153391690, 306783377, 613566757, 1227133514, 2454267025, 4908534053, 9817068106, 19634136209
Offset: 0

Views

Author

N. J. A. Sloane, Jun 07 2013

Keywords

Crossrefs

Programs

  • Maple
    A226308 := n -> 1/7*(2^(n+3) + 6*cos(2*Pi*n/3) - 4*sqrt(3)*sin(2*Pi*n/3)):
    seq(A226308(n), n = 0 .. 34); # Mélika Tebni, Mar 09 2024
  • Mathematica
    CoefficientList[Series[-(2 x^2 - x + 2) / ((2 x - 1) (x^2 + x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 18 2013 *)
    LinearRecurrence[{1,1,2},{2,1,5},40] (* Harvey P. Dale, Nov 03 2024 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 2,1,1]^n*[2;1;5])[1,1] \\ Charles R Greathouse IV, Jul 19 2016
  • Python
    a0, a1, a2 = 2, 1, 5
    for n in range(77):
      a = a2 + a1 + 2*a0
      print(a0, end=', ')
      a0, a1, a2 = a1, a2, a # Alex Ratushnyak, Jun 08 2013
    

Formula

G.f.: -(2*x^2-x+2) / ((2*x-1)*(x^2 + x + 1)). - Colin Barker, Jun 08 2013
a(3*n) = A047853(n+1), a(3*n+1) = A233328(n), a(3*n+2) = A046636(n+1). - Philippe Deléham, Feb 24 2014
From Mélika Tebni, Mar 09 2024: (Start)
E.g.f.: (1/7)*(8*exp(2*x) + exp(-x/2)*(6*cos(sqrt(3)*x/2) - 4*sqrt(3)*sin(sqrt(3)*x/2))) (Charles K. Cook and Michael R. Bacon, 2013).
a(n) = (1/7)*(2^(n+3) + 6*cos(2*Pi*n/3) - 4*sqrt(3)*sin(2*Pi*n/3)). (End)

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021