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.

A144721 a(0) = 2, a(1) = 5, a(n) = 4 * a(n-1) - a(n-2).

Original entry on oeis.org

2, 5, 18, 67, 250, 933, 3482, 12995, 48498, 180997, 675490, 2520963, 9408362, 35112485, 131041578, 489053827, 1825173730, 6811641093, 25421390642, 94873921475, 354074295258, 1321423259557, 4931618742970, 18405051712323, 68688588106322, 256349300712965
Offset: 0

Views

Author

Michael Somos, Sep 19 2008

Keywords

Comments

For all members x of the sequence, 3*x^2 - 11 is a square. - Sture Sjöstedt, Nov 30 2011

Crossrefs

Cf. A144720(n) = a(-n).

Programs

  • Magma
    I:=[2,5]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 06 2015
    
  • Mathematica
    a[0] := 2; a[1] := 5; a[n_] := a[n] = 4a[n - 1] - a[n - 2]; Table[a[n], {n, 0, 24}] (* Alonso del Arte, Nov 30 2011 *)
  • PARI
    {a(n) = real( (2 + quadgen(12))^n * ( 2 + 1 / quadgen(12) ))}
    
  • PARI
    {a(n) = subst( (4*polchebyshev(n) + polchebyshev(n-1)) / 3, x, 2)}
    
  • PARI
    Vec((2-3*x)/(1-4*x+x^2) + O(x^40)) \\ Colin Barker, Oct 12 2015

Formula

Sequence satisfies -11 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v.
G.f.: (2 - 3*x) / (1 - 4*x + x^2). a(n) = (11 + a(n-1)^2) / a(n-2).
a(n) = ((2-sqrt(3))^n*(-1+2*sqrt(3))+(2+sqrt(3))^n*(1+2*sqrt(3)))/(2*sqrt(3)). - Colin Barker, Oct 12 2015