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.

A295683 a(n) = a(n-1) + a(n-3) + a(n-4), where a(0) = 2, a(1) = 1, a(2) = 0, a(3) = 1.

Original entry on oeis.org

2, 1, 0, 1, 4, 5, 6, 11, 20, 31, 48, 79, 130, 209, 336, 545, 884, 1429, 2310, 3739, 6052, 9791, 15840, 25631, 41474, 67105, 108576, 175681, 284260, 459941, 744198, 1204139, 1948340, 3152479, 5100816, 8253295, 13354114, 21607409, 34961520, 56568929, 91530452
Offset: 0

Views

Author

Clark Kimberling, Nov 29 2017

Keywords

Comments

a(n)/a(n-1) -> (1 + sqrt(5))/2 = golden ratio (A001622), so that a( ) has the growth rate of the Fibonacci numbers (A000045).

Crossrefs

Programs

  • Magma
    I:=[2,1,0,1]; [n le 4 select I[n] else Self(n-1) +Self(n-3) +Self(n-4): n in [1..45]]; // G. C. Greubel, Apr 03 2019
    
  • Maple
    f:= gfun:-rectoproc(a(n) = a(n-1) + a(n-3) + a(n-4), a(0) = 2, a(1) = 1, a(2) = 0, a(3) = 1}, a(n), remember):
    map(f, [$0..100]); # Robert Israel, Apr 03 2019
  • Mathematica
    LinearRecurrence[{1, 0, 1, 1}, {2, 1, 0, 1}, 45]
    CoefficientList[Series[(2-x-x^2-x^3)/(1-x-x^3-x^4),{x,0,40}],x] (* Harvey P. Dale, Jun 22 2025 *)
  • PARI
    my(x='x+O('x^45)); Vec((-2 + x + x^2 + x^3)/(-1 + x + x^3 + x^4)) \\ Georg Fischer, Apr 03 2019
    
  • Sage
    ((2-x-x^2-x^3)/(1-x-x^3-x^4)).series(x, 45).coefficients(x, sparse=False) # G. C. Greubel, Apr 03 2019

Formula

G.f.: (2 - x - x^2 - x^3)/(1 - x - x^3 - x^4).
a(n) = (2/5) * A000045(n) + (4/5) * A000045(n-1) + (6/5) * A056594(n) + (3/5) * A056594(n-1) for n >= 1. - Robert Israel, Apr 03 2019

Extensions

a(0) = 2 amended by Georg Fischer, Apr 03 2019