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.

A017898 Expansion of (1-x)/(1-x-x^4).

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, 26, 36, 50, 69, 95, 131, 181, 250, 345, 476, 657, 907, 1252, 1728, 2385, 3292, 4544, 6272, 8657, 11949, 16493, 22765, 31422, 43371, 59864, 82629, 114051, 157422, 217286, 299915, 413966, 571388, 788674
Offset: 0

Views

Author

Keywords

Comments

A Lamé sequence of higher order.
Essentially the same as A003269, which has much more information.
Number of compositions of n into parts >= 4. - Joerg Arndt, Aug 13 2012

Crossrefs

For Lamé sequences of orders 1 through 9 see A000045, A000930, this one, and A017899-A017904.

Programs

  • Maple
    f := proc(r) local t1,i; t1 := []; for i from 1 to r do t1 := [op(t1),0]; od: for i from 1 to r+1 do t1 := [op(t1),1]; od: for i from 2*r+2 to 50 do t1 := [op(t1),t1[i-1]+t1[i-1-r]]; od: t1; end; # set r = order
    a:= n-> (Matrix(4, (i,j)-> if (i=j-1) then 1 elif j=1 then [1, 0$2, 1][i] else 0 fi)^n)[4,4]: seq(a(n), n=0..42); # Alois P. Heinz, Aug 04 2008
  • Mathematica
    LinearRecurrence[{1, 0, 0, 1}, {1, 0, 0, 0}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    CoefficientList[Series[(1-x)/(1-x-x^4),{x,0,50}],x] (* Harvey P. Dale, Sep 12 2019 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,0,0,1]^n*[1;0;0;0])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = a(n-1) + a(n-4). - R. J. Mathar, Mar 06 2008
G.f.: 1/(1-sum(k>=4, x^k)). - Joerg Arndt, Aug 13 2012
Apparently a(n) = hypergeometric([1-1/4*n, 5/4-1/4*n, 3/2-1/4*n, 7/4-1/4*n],[4/3-1/3*n, 5/3-1/3*n, 2-1/3*n], -4^4/3^3) for n>=13. - Peter Luschny, Sep 18 2014
a(n) = A003269(n+1)-A003269(n). - R. J. Mathar, Jun 10 2018