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.

Showing 1-3 of 3 results.

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

A276095 A nonlinear recurrence of order 4: a(1)=a(2)=a(3)=a(4)=1; a(n)=(a(n-1)+a(n-2)+a(n-3))^2/a(n-4).

Original entry on oeis.org

1, 1, 1, 1, 9, 121, 17161, 298978681, 9933176210033041, 815437979830770470704295274609, 38747106750801481775941360512378545527545442200632960401
Offset: 1

Views

Author

Seiichi Manyama, Aug 18 2016

Keywords

Comments

All terms are perfect squares.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == (a[n - 1] + a[n - 2] + a[n - 3])^2/a[n - 4], a[1] == a[2] == a[3] == a[4] == 1}, a, {n, 1, 12}] (* Michael De Vlieger, Aug 18 2016 *)
    nxt[{a_,b_,c_,d_}]:={b,c,d,(b+c+d)^2/a}; NestList[nxt,{1,1,1,1},10][[;;,1]] (* Harvey P. Dale, Aug 20 2024 *)
  • Ruby
    def A(m, n)
      a = Array.new(m, 1)
      ary = [1]
      while ary.size < n
        i = a[1..-1].inject(:+)
        j = i * i
        break if j % a[0] > 0
        a = *a[1..-1], j / a[0]
        ary << a[0]
      end
      ary
    end
    def A276095(n)
      A(4, n)
    end

Formula

a(n) = A072878(n)^2.
a(n) = 16*a(n-1)*a(n-2)*a(n-3) - 2a(n-1) - 2a(n-2) - 2a(n-3) - a(n-4).
a(n)*a(n-1)*a(n-2)*a(n-3) = ((a(n) + a(n-1) + a(n-2) + a(n-3))/4)^2.

A276097 A nonlinear recurrence of order 5: a(1)=a(2)=a(3)=a(4)=a(5)=1; a(n)=(a(n-1)+a(n-2)+a(n-3)+a(n-4))^2/a(n-5).

Original entry on oeis.org

1, 1, 1, 1, 1, 16, 361, 143641, 20741472361, 430214650013601071641, 11567790319010747187536221088708755344001, 370675271093071368960746074163948008803845834307486807769098691609909105887376
Offset: 1

Views

Author

Seiichi Manyama, Aug 18 2016

Keywords

Comments

All terms are perfect squares.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[1] == a[2] == a[3] == a[4] == a[5] == 1, a[n] == (a[n-1] + a[n-2] + a[n-3] + a[n-4])^2 / a[n-5]}, a, {n, 15}] (* Vincenzo Librandi, Aug 21 2016 *)
  • Ruby
    def A(m, n)
      a = Array.new(m, 1)
      ary = [1]
      while ary.size < n
        i = a[1..-1].inject(:+)
        j = i * i
        break if j % a[0] > 0
        a = *a[1..-1], j / a[0]
        ary << a[0]
      end
      ary
    end
    def A276097(n)
      A(5, n)
    end

Formula

a(n) = A072879(n)^2.
a(n) = 25*a(n-1)*a(n-2)*a(n-3)*a(n-4) - 2a(n-1) - 2a(n-2) - 2a(n-3) - 2a(n-4) - a(n-5).
a(n)*a(n-1)*a(n-2)*a(n-3)*a(n-4) = ((a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4))/5)^2.
Showing 1-3 of 3 results.