login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287839 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 9. 8

%I #11 Nov 25 2017 21:49:27

%S 1,11,117,1247,13289,141619,1509213,16083463,171399121,1826575451,

%T 19465548357,207441511727,2210673955769,23558830139779,

%U 251063019088173,2675542001860183,28512861152219041,303857405535211691,3238164083417650197,34508642672922983807

%N Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 9.

%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="/A287839/b287839.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,7).

%F For n>2, a(n) = 10*a(n-1) + 7*a(n-2), a(0)=1, a(1)=11, a(2)=117.

%F G.f.: (-1 - x)/(-1 + 10 x + 7 x^2).

%F a(n) = (((5-4*sqrt(2))^n*(-3+2*sqrt(2)) + (3+2*sqrt(2))*(5+4*sqrt(2))^n)) / (4*sqrt(2)). - _Colin Barker_, Nov 25 2017

%p a:=proc(n) option remember; if n=0 then 1 elif n=1 then 11 elif n=2 then 117 else 10*a(n-1)+7*a(n-2); fi; end: seq(a(n), n=0..30); # _Wesley Ivan Hurt_, Nov 25 2017

%t LinearRecurrence[{10, 7}, {1, 11, 117}, 20]

%o (Python)

%o def a(n):

%o .if n in [0,1,2]:

%o ..return [1, 11, 117][n]

%o .return 10*a(n-1) + 7*a(n-2)

%o (PARI) Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ _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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)