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!)
A287809 Number of septenary sequences of length n such that no two consecutive terms have distance 2. 0
1, 7, 39, 219, 1231, 6921, 38913, 218789, 1230147, 6916539, 38888455, 218651553, 1229375193, 6912200477, 38864063403, 218514412227, 1228604118319, 6907865088537, 38839687552689, 218377358251349, 1227833528067027, 6903532420748427, 38815326992539159 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
For n>4, a(n) = 6*a(n-1) - 13*a(n-3) + 6*a(n-4), a(1)=7, a(2)=39, a(3)=219, a(4)=1231.
G.f.: (1 + x - 3*x^2 - 2*x^3 + 2*x^4)/(1 - 6*x + 13*x^3 - 6*x^4).
EXAMPLE
For n=2 the a(2)=49-10=39 sequences contain every combination except these ten: 02,20,13,31,24,42,35,53,46,64.
MATHEMATICA
LinearRecurrence[{6, 0, -13, 6}, {1, 7, 39, 219, 1231}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2, 3, 4]:
..return [1, 7, 39, 219, 1231][n]
.return 6*a(n-1)-13*a(n-3)+6*a(n-4)
CROSSREFS
Sequence in context: A092923 A164550 A125786 * A155589 A071082 A122884
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 23 09:48 EDT 2024. Contains 371905 sequences. (Running on oeis4.)