OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (9, -11, -15, 19, 1).
FORMULA
a(n) = 9*a(n-1) - 11*a(n-2) - 15*a(n-3) + 19*a(n-4) + a(n-5), a(0)=1, a(1)=9, a(2)=65, a(3)=471, a(4)=3413.
G.f: (-1 + 5 x^2 - 5 x^4)/(-1 + 9 x - 11 x^2 - 15 x^3 + 19 x^4 + x^5).
EXAMPLE
For n=2 the a(2) = 81 - 16 = 65 sequences contain every combination except these sixteen: 01,10,12,21,23,32,34,43,45,54,56,65,67,76,78,87.
MATHEMATICA
LinearRecurrence[{9, -11, -15, 19, 1}, {1, 9, 65 , 471, 3413}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2, 3, 4]:
..return [1, 9, 65 , 471, 3413][n]
.return 9*a(n-1)-11*a(n-2)-15*a(n-3)+19*a(n-4)+a(n-5)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 02 2017
STATUS
approved