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.

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

Original entry on oeis.org

0, 3, 9, 36, 135, 513, 1944, 7371, 27945, 105948, 401679, 1522881, 5773680, 21889683, 82990089, 314639316, 1192888215, 4522582593, 17146412424, 65006985051, 246460192425, 934401532428, 3542585174559, 13430960120961
Offset: 0

Views

Author

Roger L. Bagula, May 29 2005

Keywords

Comments

The first entry of the vector v[n] = M*v[n-1], where M is the 2 x 2 matrix [[0,3],[1,3]] and v[1] is the column vector [0,1]. The characteristic polynomial of the matrix M is x^2-3x-3.

Crossrefs

Programs

  • Haskell
    a106435 n = a106435_list !! n
    a106435_list = 0 : 3 : map (* 3) (zipWith (+) a106435_list (tail
    a106435_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    a:=[0,3]; [n le 2 select a[n] else    3*Self(n-1) + 3*Self(n-2) : n in [1..24]]; // Marius A. Burtea, Jan 21 2020
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 25); Coefficients(R!(3*x/(1-3*x-3*x^2))); // Marius A. Burtea, Jan 21 2020
    
  • Maple
    seq(coeff(series(3*x/(1-3*x-3*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Mar 12 2020
  • Mathematica
    LinearRecurrence[{3,3}, {0,3}, 30] (* G. C. Greubel, Mar 12 2020 *)
  • PARI
    a(n)=([0,3;1,3]^n)[1,2]
    
  • Sage
    [3^((n+1)/2)*i^(1-n)*chebyshev_U(n-1, i*sqrt(3)/2) for n in (0..30)] # G. C. Greubel, Mar 12 2020

Formula

G.f.: 3*x/(1-3*x-3*x^2). - Philippe Deléham, Nov 19 2008
From G. C. Greubel, Mar 12 2020: (Start)
a(n) = 3^((n+1)/2) * Fibonacci(n, sqrt(3)), where F(n, x) is the Fibonacci polynomial.
a(n) = 3^((n+1)/2)*i^(1-n)*ChebyshevU(n-1, i*sqrt(3)/2). (End)

Extensions

Edited by N. J. A. Sloane, May 20 2006 and May 29 2006
Offset corrected by Reinhard Zumkeller, Oct 15 2011