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.

A165903 a(n) = (a(n-1)^2 + a(n-2)^2 + a(n-1)*a(n-2))/a(n-3) with three initial ones.

Original entry on oeis.org

1, 1, 1, 3, 13, 217, 16693, 21717363, 2175145909081, 283430597537694797281, 3699017428454717709381715649628841, 6290488320295607125006566146327310005599469877825552723
Offset: 0

Views

Author

Jaume Oliver Lafont, Sep 29 2009

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,1,1];; for n in [4..12] do a[n]:= (a[n-1]^2 + a[n-2]^2 + a[n-1]*a[n-2])/a[n-3]; od; a; # G. C. Greubel, Dec 19 2019
  • Magma
    I:=[1,1,1]; [n le 3 select I[n] else (Self(n-1)^2 + Self(n-2)^2 + Self(n-1)*Self(n-2))/Self(n-3): n in [1..12]]; // G. C. Greubel, Dec 19 2019
    
  • Maple
    a:= proc(n, k) option remember;
          if n<3 then 1
        else (a(n-1)^2 + a(n-2)^2 + a(n-1)*a(n-2))/a(n-3)
          fi; end:
    seq( a(n), n=0..12); # G. C. Greubel, Dec 19 2019
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==1,a[2]==1, a[n]==(a[n-1]^2+a[n-2]^2+a[n-1]*a[n-2])/a[n-3]},a,{n,0,10}] (* Vaclav Kotesovec, May 06 2015 *)
    nxt[{a_,b_,c_}]:={b,c,(c^2+b^2+b*c)/a}; NestList[nxt,{1,1,1},10][[All,1]] (* Harvey P. Dale, Oct 24 2022 *)
  • PARI
    a(n)=if(n<3,1,(a(n-1)^2 +a(n-2)^2 +a(n-1)*a(n-2))/a(n-3))
    
  • Sage
    @CachedFunction
    def a(n):
        if (n<3): return 1
        else: return (a(n-1)^2+a(n-2)^2+a(n-1)*a(n-2))/a(n-3)
    [a(n) for n in (0..12)] # G. C. Greubel, Dec 19 2019
    

Formula

a(n) ~ 1/6 * c^(((1+sqrt(5))/2)^n), where c = 1.902254978346365075882696720546123493664... . - Vaclav Kotesovec, May 06 2015
a(n) = 6*a(n-1)*a(n-2)-a(n-1)-a(n-2)-a(n-3). - Bruno Langlois, Aug 21 2016

Extensions

"frac" keyword removed by Jaume Oliver Lafont, Oct 13 2009