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.

A083337 a(n) = 2*a(n-1) + 2*a(n-2); a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 6, 18, 48, 132, 360, 984, 2688, 7344, 20064, 54816, 149760, 409152, 1117824, 3053952, 8343552, 22795008, 62277120, 170144256, 464842752, 1269974016, 3469633536, 9479215104, 25897697280, 70753824768, 193303044096, 528113737728, 1442833563648, 3941894602752, 10769456332800
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003

Keywords

Crossrefs

Programs

  • Haskell
    a083337 n = a083337_list !! n
    a083337_list =
       0 : 3 : map (* 2) (zipWith (+) a083337_list (tail a083337_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Mathematica
    CoefficientList[Series[3x/(1-2x-2x^2), {x, 0, 25}], x]
    s = Sqrt[3]; a[n_] := Simplify[s*((1 + s)^n - (1 - s)^n)/2]; Array[a, 30, 0] (* or *)
    LinearRecurrence[{2, 2}, {0, 3}, 31] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    apply( a(n)=([1,1;3,1]^n)[2,1], [0..30]) \\ or: ([2,2;1,0]^n)[2,1]*3. - M. F. Hasler, Aug 06 2018

Formula

G.f.: 3x/(1 - 2x - 2x^2).
a(n) = a(n-1) + 3*A026150(n-1). a(n)/A026150(n) converges to sqrt(3).
a(n) = lower left term of [1,1; 3,1]^n. - Gary W. Adamson, Mar 12 2008

Extensions

Edited and definition completed by M. F. Hasler, Aug 06 2018