|
|
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).
|
|
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
|
Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|