A287837 Number of words over the alphabet {0,1,...,10} such that no two consecutive terms have distance 7.
1, 11, 113, 1163, 11969, 123179, 1267697, 13046507, 134268161, 1381821131, 14221015793, 146355621323, 1506219260609, 15501259470059, 159531252482417, 1641816303234347, 16896756789790721, 173893016807610251, 1789620438445474673, 18417883434877577483
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (10,3).
Crossrefs
Programs
-
Mathematica
LinearRecurrence[{10, 3}, {1, 11, 113}, 20]
-
Python
def a(n): if n in [0,1,2]: return [1, 11, 113][n] return 10*a(n-1) + 3*a(n-2)
Formula
For n>2, a(n) = 10*a(n-1) + 3*a(n-2), a(0)=1, a(1)=11, a(2)=113.
G.f.: (-1 - x)/(-1 + 10*x + 3*x^2).
Comments