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!)
A287815 Number of octonary sequences of length n such that no two consecutive terms have distance 7. 0
1, 8, 62, 482, 3746, 29114, 226274, 1758602, 13667858, 106226618, 825593474, 6416514026, 49869159026, 387583197338, 3012297335522, 23411580532682, 181954847741906, 1414153417389434, 10990803008177474, 85420541561578922, 663888608980117298, 5159743512230294618 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = 7*a(n-1) + 6*a(n-2), a(0)=1, a(1)=8.
G.f.: (-1 - x)/(-1 + 7 x + 6 x^2).
a(n) = A015564(n)+A015564(n+1). - R. J. Mathar, Oct 20 2019
EXAMPLE
For n=2 the a(2) = 64 - 2 = 62 sequences contain every combination except these two: 07,70.
MATHEMATICA
LinearRecurrence[{7, 6}, {1, 8}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1]:
..return [1, 8][n]
.return 7*a(n-1)+6*a(n-2)
CROSSREFS
Sequence in context: A125396 A163444 A190975 * A244831 A331235 A053095
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 02 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 12:33 EDT 2024. Contains 371969 sequences. (Running on oeis4.)