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!)
A287808 Number of septenary sequences of length n such that no two consecutive terms have distance 1. 0
1, 7, 37, 197, 1049, 5587, 29757, 158491, 844153, 4496123, 23947233, 127547675, 679344041, 3618320227, 19271886609, 102645866251, 546712113769, 2911896468083, 15509334488577, 82605772190267, 439974623297369, 2343391557436483, 12481365289466289 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
For n>4, a(n) = 7*a(n-1) - 8*a(n-2) - 6*a(n-3) + 6*a(n-4), a(1)=7, a(2)=37, a(3)=197, a(4)=1049.
G.f.: (1-4*x^2+2*x^4)/(1-7*x+8*x^2+6*x^3-6*x^4).
EXAMPLE
For n=2 the a(2)=37=49-12 sequences contain every combination except these twelve: 01,10,12,21,23,32,34,43,45,54,56,65.
MATHEMATICA
LinearRecurrence[{7, -8, -6, 6}, {1, 7, 37, 197, 1049}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2, 3, 4]:
..return [1, 7, 37, 197, 1049][n]
.return 7*a(n-1)-8*a(n-2)-6*a(n-3)+6*a(n-4)
CROSSREFS
Sequence in context: A085640 A196805 A069378 * A117130 A002807 A124610
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 16 11:35 EDT 2024. Contains 371711 sequences. (Running on oeis4.)