login
A364705
Expansion of 1/(1 - 4*x - x^2 + x^3).
3
1, 4, 17, 71, 297, 1242, 5194, 21721, 90836, 379871, 1588599, 6643431, 27782452, 116184640, 485877581, 2031912512, 8497342989, 35535406887, 148607058025, 621466295998, 2598936835130, 10868606578493, 45451896853104, 190077257155779, 794892318897727, 3324194635893583
OFFSET
0,2
FORMULA
G.f.: 1/(1 - 4*x - x^2 + x^3).
a(n) = 4*a(n-1) + a(n-2) - a(n-3).
a(n) = Sum_{k=0..n} Sum_{j=0..k} binomial(n-k, j)*binomial(n-k, k-j)* 4^(n-2*k)*((1-sqrt(17))/2)^(k-j)*(1+sqrt(17))/2)^j.
MATHEMATICA
LinearRecurrence[{4, 1, -1}, {1, 4, 17}, 41]
PROG
(Magma) I:=[1, 4, 17]; [n le 3 select I[n] else 4*Self(n-1) +Self(n-2) -Self(n-3): n in [1..41]];
(SageMath)
@CachedFunction
def a(n): # a = A364705
if (n<3): return (1, 4, 17)[n]
else: return 4*a(n-1) +a(n-2) -a(n-3)
[a(n) for n in range(41)]
CROSSREFS
Sequence in context: A017956 A136792 A188482 * A179606 A108929 A297578
KEYWORD
nonn
AUTHOR
G. C. Greubel, Aug 04 2023
STATUS
approved