%I #13 Nov 26 2017 09:44:36
%S 1,11,115,1205,12625,132275,1385875,14520125,152130625,1593906875,
%T 16699721875,174966753125,1833166140625,19206495171875,
%U 201230782421875,2108340300078125,22089556912890625,231437270629296875,2424820490857421875,25405391261720703125
%N Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 8.
%C 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).
%H Colin Barker, <a href="/A287838/b287838.txt">Table of n, a(n) for n = 0..900</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (10,5).
%F For n > 2, a(n) = 10*a(n-1) + 5*a(n-2), a(0)=1, a(1)=11, a(2)=115.
%F G.f.: (-1 - x)/(-1 + 10*x + 5*x^2).
%F a(n) = (((5-sqrt(30))^n*(-6+sqrt(30)) + (5+sqrt(30))^n*(6+sqrt(30)))) / (2*sqrt(30)). - _Colin Barker_, Nov 25 2017
%t LinearRecurrence[{10, 5}, {1, 11, 115}, 20]
%o (Python)
%o def a(n):
%o .if n in [0,1,2]:
%o ..return [1, 11, 115][n]
%o .return 10*a(n-1) + 5*a(n-2)
%o (PARI) Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ _Colin Barker_, Nov 25 2017
%Y Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. A287825-A287839.
%K nonn,easy
%O 0,2
%A _David Nacin_, Jun 07 2017
|