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
1, 11, 117, 1247, 13289, 141619, 1509213, 16083463, 171399121, 1826575451, 19465548357, 207441511727, 2210673955769, 23558830139779, 251063019088173, 2675542001860183, 28512861152219041, 303857405535211691, 3238164083417650197, 34508642672922983807 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
For n>2, a(n) = 10*a(n-1) + 7*a(n-2), a(0)=1, a(1)=11, a(2)=117.
G.f.: (-1 - x)/(-1 + 10 x + 7 x^2).
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
MAPLE
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
MATHEMATICA
LinearRecurrence[{10, 7}, {1, 11, 117}, 20]
PROG
(Python)
def a(n):
.if n in [0, 1, 2]:
..return [1, 11, 117][n]
.return 10*a(n-1) + 7*a(n-2)
(PARI) Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ Colin Barker, Nov 25 2017
CROSSREFS
Sequence in context: A271477 A076554 A173616 * A268344 A289344 A240392
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 07 2017
STATUS
approved

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 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)