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.

A021001 Pisot sequence P(2,9).

Original entry on oeis.org

2, 9, 40, 178, 792, 3524, 15680, 69768, 310432, 1381264, 6145920, 27346208, 121676672, 541399104, 2408949760, 10718597248, 47692288512, 212206348544, 944209971200, 4201252581888, 18693430269952, 83176226243584, 370091765514240, 1646719514544128
Offset: 0

Views

Author

Keywords

Crossrefs

See A008776 for definitions of Pisot sequences.

Programs

  • Magma
    Iv:=[2, 9]; [n le 2 select Iv[n] else Ceiling(Self(n-1)^2/Self(n-2)-1/2): n in [1..30]]; // Bruno Berselli, Feb 04 2016
  • Mathematica
    RecurrenceTable[{a[0] == 2, a[1] == 9, a[n] == Ceiling[a[n - 1]^2/a[n - 2]-1/2]}, a, {n, 0, 30}] (* Bruno Berselli, Feb 04 2016 *)
  • PARI
    lista(nn) = {print1(x = 2, ", ", y = 9, ", "); for (n=1, nn, z = ceil(y^2/x -1/2); print1(z, ", "); x = y; y = z;);} \\ Michel Marcus, Feb 04 2016
    

Formula

Pisot sequence P(x, y): a(0) = x, a(1) = y, a(n) = roundDown(a(n-1)^2/a(n-2)) = ceiling(a(n-1)^2/a(n-2) - 1/2).
Appears to satisfy a(n) = 4*a(n-1) + 2*a(n-2).