OFFSET
0,2
LINKS
FORMULA
For n>2, a(n) = 7*a(n-1) - 3*a(n-2), a(0)=1, a(1)=8, a(2)=52.
G.f.: (1 + x - x^2)/(1 - 7 x + 3 x^2).
EXAMPLE
For n=2 the a(2) = 64 - 12 = 52 sequences contain every combination except these twelve: 02,20,13,31,24,42,35,53,46,64,57,75.
MATHEMATICA
LinearRecurrence[{7, -3}, {1, 8, 52}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2]:
..return [1, 8, 52][n]
.return 7*a(n-1)-3*a(n-2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 02 2017
STATUS
approved