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!)
A287806 Number of senary sequences of length n such that no two consecutive terms have distance 1. 0
1, 6, 26, 114, 500, 2194, 9628, 42252, 185422, 813722, 3571010, 15671340, 68773514, 301811860, 1324498252, 5812546998, 25508302906, 111942925778, 491260382084, 2155891150146, 9461106209228, 41519967599596, 182209952129086, 799626506818554, 3509152727035810 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
For n>3, a(n) = 5*a(n-1) - 2*a(n-2) - 3*a(n-3), a(1)=6, a(2)=26, a(3)=114.
G.f.: (1 + x - 2*x^2 - x^3)/(1 - 5*x + 2*x^2 + 3*x^3).
EXAMPLE
For n=2 the a(2)=26=36-10 sequences contain every combination except these ten: 01,10,12,21,23,32,34,43,45,54.
MATHEMATICA
LinearRecurrence[{5, -2, -3}, {1, 6, 26, 114}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2, 3]:
..return [1, 6, 26, 114][n]
.return 5*a(n-1)-2*a(n-2)-3*a(n-3)
CROSSREFS
Sequence in context: A145374 A289789 A124465 * A164549 A283341 A046647
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 01 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 25 09:49 EDT 2024. Contains 371967 sequences. (Running on oeis4.)