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.

A018920 Pisot sequence T(3,10), a(n) = floor(a(n-1)^2/a(n-2)).

Original entry on oeis.org

3, 10, 33, 108, 353, 1153, 3766, 12300, 40172, 131202, 428506, 1399501, 4570771, 14928140, 48755311, 159234864, 520061125, 1698519827, 5547366384, 18117700664, 59172417076, 193257136076, 631177877968, 2061427183105, 6732621943159, 21988745758766
Offset: 0

Views

Author

Keywords

Crossrefs

See A008776 for definitions of Pisot sequences.

Programs

  • Magma
    Txy:=[3,10]; [n le 2 select Txy[n] else Floor(Self(n-1)^2/Self(n-2)): n in [1..30]]; // Bruno Berselli, Feb 05 2016
    
  • Maple
    PisotT := proc(a0,a1,n)
        option remember;
        if n = 0 then
            a0 ;
        elif n = 1 then
            a1;
        else
            floor( procname(a0,a1,n-1)^2/procname(a0,a1,n-2)) ;
        end if;
    end proc:
    A018920 := proc(n)
        PisotT(3,10,n) ;
    end proc: # R. J. Mathar, Feb 13 2016
  • Mathematica
    RecurrenceTable[{a[0] == 3, a[1] == 10, a[n] == Floor[a[n - 1]^2/a[n - 2] ]}, a, {n, 0, 30}] (* Bruno Berselli, Feb 05 2016 *)
  • PARI
    pisotT(nmax, a1, a2) = {
      a=vector(nmax); a[1]=a1; a[2]=a2;
      for(n=3, nmax, a[n] = floor(a[n-1]^2/a[n-2]));
      a
    }
    pisotT(50, 3, 10) \\ Colin Barker, Jul 29 2016

Formula

a(n) = 3*a(n-1) + a(n-2) - a(n-4) - a(n-5) - a(n-6) (holds at least up to n = 1000 but is not known to hold in general).

Extensions

Corrected by David W. Wilson