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.
%I A021001 #35 Dec 30 2023 23:43:44 %S A021001 2,9,40,178,792,3524,15680,69768,310432,1381264,6145920,27346208, %T A021001 121676672,541399104,2408949760,10718597248,47692288512,212206348544, %U A021001 944209971200,4201252581888,18693430269952,83176226243584,370091765514240,1646719514544128 %N A021001 Pisot sequence P(2,9). %H A021001 Colin Barker, <a href="/A021001/b021001.txt">Table of n, a(n) for n = 0..1000</a> %H A021001 <a href="/index/Ph#Pisot">Index entries for Pisot sequences</a> %F A021001 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). %F A021001 Appears to satisfy a(n) = 4*a(n-1) + 2*a(n-2). %t A021001 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 *) %o A021001 (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 %o A021001 (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 %Y A021001 See A008776 for definitions of Pisot sequences. %K A021001 nonn %O A021001 0,1 %A A021001 _R. K. Guy_