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.

A168674 a(n) = 2*A001610(n).

Original entry on oeis.org

0, 4, 6, 12, 20, 34, 56, 92, 150, 244, 396, 642, 1040, 1684, 2726, 4412, 7140, 11554, 18696, 30252, 48950, 79204, 128156, 207362, 335520, 542884, 878406, 1421292, 2299700, 3720994, 6020696, 9741692, 15762390, 25504084, 41266476, 66770562, 108037040
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Jun 01 2010

Keywords

Comments

This sequence has a golden mean ratio limit.

Crossrefs

Programs

  • Magma
    I:=[0,4,6]; [n le 3 select I[n] else 2*Self(n-1)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jul 30 2016
    
  • Mathematica
    M = {{0, 1}, {1, 1}} v[0] = {0, 1}; v[n_] := v[n] = M.v[n - 1] + {3, 2} a = Table[v[n][[1]], {n, 0, 30}]
    LinearRecurrence[{2, 0, -1}, {0, 4, 6}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 10 2012 *)
    RecurrenceTable[{a[0] == 0, a[1] == 4, a[2] == 6, a[n] == 2 a[n-1] - a[n-3]}, a, {n, 50}] (* Vincenzo Librandi, Jul 30 2016 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -1,0,2]^n*[0;4;6])[1,1] \\ Charles R Greathouse IV, Jul 30 2016

Formula

a(n) = 2*a(n-1) - a(n-3). [Dec 03 2009]
G.f.: 2*x*(2 - x)/((1-x)*(1 -x -x^2)). [Dec 03 2009]

Extensions

Definition simplified and notation in formulas set to OEIS standards by the Assoc. Editors of the OEIS, Dec 03 2009