OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (10,-2,-21,10).
FORMULA
a(n) = 10*a(n-1) - 2*a(n-2) - 21*a(n-3) + 10*a(n-4), a(0)=1, a(1)=11, a(2)=105, a(3)=1005, a(4)=9621.
G.f.: (-1 - x + 3*x^2 + 2*x^3 - 2*x^4)/(-1 + 10*x - 2*x^2 - 21*x^3 + 10*x^4).
MATHEMATICA
LinearRecurrence[{10, -2, -21, 10}, {1, 11, 105, 1005, 9621}, 20]
PROG
(Python)
def a(n):
.if n in [0, 1, 2, 3, 4]:
..return [1, 11, 105, 1005, 9621][n]
.return 10*a(n-1) - 2*a(n-2) - 21*a(n-3) + 10*a(n-4)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 07 2017
STATUS
approved