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.

A277253 a(n) = a(n-2) + a(n-3) + a(n-4) for n>3, a(0)=1, a(1)=a(2)=0, a(3)=2.

Original entry on oeis.org

1, 0, 0, 2, 1, 2, 3, 5, 6, 10, 14, 21, 30, 45, 65, 96, 140, 206, 301, 442, 647, 949, 1390, 2038, 2986, 4377, 6414, 9401, 13777, 20192, 29592, 43370, 63561, 93154, 136523, 200085, 293238, 429762, 629846, 923085, 1352846, 1982693, 2905777, 4258624, 6241316, 9147094, 13405717, 19647034, 28794127, 42199845
Offset: 0

Views

Author

Nicolas Bègue, Oct 07 2016

Keywords

Comments

a(n+1)/a(n) = 1.465571... like Narayana's cows sequence A000930.

Crossrefs

Cf. A000930.

Programs

  • Magma
    I:=[1,0,0,2]; [n le 4 select I[n] else Self(n-2)+Self(n-3)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Nov 07 2016
  • Maple
    a:= n-> (<<0|1|0|0>, <0|0|1|0>,
              <0|0|0|1>, <1|1|1|0>>^n. <<1,0,0,2>>)[1,1]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Oct 07 2016
  • Mathematica
    RecurrenceTable[{a[n] == a[n - 2] + a[n - 3] + a[n - 4], a[1] ==1,  a[2] == a[3] == 0, a[4] == 2}, a, {n, 50}]
    LinearRecurrence[{0, 1, 1, 1}, {1, 0, 0, 2}, 52]
    CoefficientList[Series[(-1 + x^2 - x^3)/(-1 + x^2 + x^3 + x^4), {x, 0, 52}], x]
    nxt[{a_,b_,c_,d_}]:={b,c,d,a+b+c}; NestList[nxt,{1,0,0,2},50][[;;,1]] (* Harvey P. Dale, Jun 10 2023 *)

Formula

G.f.: (1 - x^2 + x^3)/((1 + x)*(1 - x - x^3)).