ternary recurrence sequence
Is there a built in general recurrence sequence function like the binary recurrence sequence?
def a(n):
return BinaryRecurrenceSequence(a,b,c,d)
returns the sequence $U_0=c$, $U_1=d$, and $U_n=aU_{n-1}+bU_{n-2}$.
I would like something that returns $U_n=aU_{n-1}+bU_{n-2}+cU_{n-3}$
Any help is much appreciated!