login
A287838
Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 8.
1
1, 11, 115, 1205, 12625, 132275, 1385875, 14520125, 152130625, 1593906875, 16699721875, 174966753125, 1833166140625, 19206495171875, 201230782421875, 2108340300078125, 22089556912890625, 231437270629296875, 2424820490857421875, 25405391261720703125
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).
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
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 07 2017
STATUS
approved