OFFSET
0,2
COMMENTS
In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).
LINKS
Colin Barker, Table of n, a(n) for n = 0..900
Index entries for linear recurrences with constant coefficients, signature (10,5).
FORMULA
For n > 2, a(n) = 10*a(n-1) + 5*a(n-2), a(0)=1, a(1)=11, a(2)=115.
G.f.: (-1 - x)/(-1 + 10*x + 5*x^2).
a(n) = (((5-sqrt(30))^n*(-6+sqrt(30)) + (5+sqrt(30))^n*(6+sqrt(30)))) / (2*sqrt(30)). - Colin Barker, Nov 25 2017
MATHEMATICA
LinearRecurrence[{10, 5}, {1, 11, 115}, 20]
PROG
(Python)
def a(n):
.if n in [0, 1, 2]:
..return [1, 11, 115][n]
.return 10*a(n-1) + 5*a(n-2)
(PARI) Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ Colin Barker, Nov 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 07 2017
STATUS
approved