OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (8, -1, -23, 10, 1).
FORMULA
a(n) = 8*a(n-1) - 1*a(n-2) - 23*a(n-3) + 10*a(n-4) + a(n-5), a(0)=1, a(1)=9, a(2)=67, a(3)=501, a(4)=3747.
G.f: (-1 - x + 4 x^2 + 3 x^3 - 3 x^4)/(-1 + 8 x - x^2 - 23 x^3 + 10 x^4 + x^5).
EXAMPLE
For n=2 the a(2) = 81 - 14 = 67 sequences contain every combination except these fourteen: 02,20,13,31,24,42,35,53,46,64,57,75,68,86.
MATHEMATICA
LinearRecurrence[{8, -1, -23, 10, 1}, {1, 9, 67 , 501, 3747}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2, 3, 4]:
..return [1, 9, 67 , 501, 3747][n]
.return 8*a(n-1)-a(n-2)-23*a(n-3)+10*a(n-4)+a(n-5)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 02 2017
STATUS
approved