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.

A317974 a(n) = 2*(a(n-1)+a(n-2)+a(n-3))-a(n-4) for n >= 4, with initial terms 0,0,1,1.

Original entry on oeis.org

0, 0, 1, 1, 4, 12, 33, 97, 280, 808, 2337, 6753, 19516, 56404, 163009, 471105, 1361520, 3934864, 11371969, 32865601, 94983348, 274506972, 793339873, 2292794785, 6626299912, 19150362168, 55345573857, 159951677089, 462268926316, 1335981992356, 3861059617665
Offset: 0

Views

Author

N. J. A. Sloane, Sep 03 2018

Keywords

Programs

  • Mathematica
    nxt[{a_,b_,c_,d_}]:={b,c,d,2(b+c+d)-a}; NestList[nxt,{0,0,1,1},30][[;;,1]] (* or *) LinearRecurrence[{2,2,2,-1},{0,0,1,1},40] (* Harvey P. Dale, Dec 10 2024 *)
  • PARI
    concat(vector(2), Vec(x^2*(1 - x) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4) + O(x^40))) \\ Colin Barker, Sep 04 2018
  • Python
    a1,a2,a3,a4,n = 1,1,0,0,3
    print(0,0)
    print(1,0)
    print(2,1)
    print(3,1)
    while n < 2172:
        a1,a2,a3,a4,n = 2*(a1+a2+a3)-a4,a1,a2,a3,n+1
        print(n,a1) # A.H.M. Smeets, Sep 04 2018
    

Formula

Lim {n -> infinity} log(a(n))/n = 1.0612750619050... = log(phi+sqrt(phi)) = log(A001622+A139339), where phi is the golden ratio. - A.H.M. Smeets, Sep 04 2018
G.f.: x^2*(1 - x) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4). - Colin Barker, Sep 04 2018