cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A364705 Expansion of 1/(1 - 4*x - x^2 + x^3).

Original entry on oeis.org

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

Views

Author

G. C. Greubel, Aug 04 2023

Keywords

Crossrefs

Programs

  • 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]];
    
  • Mathematica
    LinearRecurrence[{4,1,-1}, {1,4,17}, 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)]

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.