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.

A007800 From a problem in AI planning: a(n) = 4+a(n-1)+a(n-2)+a(n-3)+a(n-4)-a(n-5)-a(n-6)-a(n-7), n>7.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 59, 111, 207, 384, 710, 1310, 2414, 4445, 8181, 15053, 27693, 50942, 93704, 172356, 317020, 583099, 1072495, 1972635, 3628251, 6673404, 12274314, 22575994, 41523738, 76374073, 140473833, 258371673, 475219609, 874065146
Offset: 1

Views

Author

Peter Jonsson [ petej(AT)ida.liu.se ]

Keywords

Comments

The number of length n binary words with fewer than 3 zeros between any pair of consecutive ones. - Jeffrey Liese, Dec 23 2010

Crossrefs

Cf. A062544.

Programs

  • Maple
    for n from 1 to 5 do a[n]:= [1,2,4,8,16][n] od:
    for n from 6 to 100 do a[n]:= 3*a[n-1]-2*a[n-2]-a[n-4]+a[n-5] od:
    seq(a[n],n=1..100); # Robert Israel, Aug 19 2014
  • Mathematica
    LinearRecurrence[{3,-2,0,-1,1},{1,2,4,8,16},40] (* Harvey P. Dale, Apr 24 2013 *)
  • PARI
    Vec(-x*(x^4-x+1)/((x-1)^2*(x^3+x^2+x-1)) + O(x^100)) \\ Colin Barker, Aug 18 2014

Formula

a(1)=1, a(2)=2, a(3)=4, a(4)=8, a(5)=16, a(n)=3*a(n-1)-2*a(n-2)+0*a(n-3)- a(n-4)+ a(n-5). - Harvey P. Dale, Apr 24 2013
G.f.: -x*(x^4-x+1) / ((x-1)^2*(x^3+x^2+x-1)). - Colin Barker, Aug 18 2014
2*a(n) = A001590(n+4)-n. - R. J. Mathar, Aug 16 2017