OFFSET
1,3
COMMENTS
REFERENCES
A. Engel, Wahrscheinlichkeit und Statistik, Band 2, Klett, 1978, pages 25-26.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-1).
FORMULA
a(n) = +2*a(n-1) -a(n-2) +a(n-3) -a(n-4), n>=5.
G.f.: x^3*(2-x)/((1-x)*(1-x-x^3)).
a(n) = a(n-1) + a(n-3) + 1, n>3. - Greg Dresden, Feb 09 2020
EXAMPLE
For n=6 the a(6)=7 solutions are (0,0,0,1,1,0),(1,0,0,1,1,0),(0,0,1,1,1,0),(0,1,1,1,1,0),(1,1,1,1,1,0) for Abel and (0,0,0,1,0,1),(1,0,0,1,0,1) for Kain.
MAPLE
a(1):=0: a(2):=0: a(3):=2: a(4):=3: a(5):=4:
for n from 6 to 100 do
a(n):=a(n-1)+a(n-2)-a(n-5):
end do:
seq(a(n), n=1..100);
MATHEMATICA
Rest[CoefficientList[Series[x^3*(2 - x)/((1 - x)*(1 - x - x^3)), {x, 0, 50}], x]] (* G. C. Greubel, May 02 2017 *)
PROG
(PARI) x='x+O('x^50); concat([0, 0], Vec(x^3*(2 - x)/((1 - x)*(1 - x - x^3)))) \\ G. C. Greubel, May 02 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Weisenhorn, Oct 28 2011
STATUS
approved