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 A019495 #39 Dec 06 2023 13:58:07 %S A019495 4,11,30,81,218,586,1575,4233,11376,30572,82159,220793,593356,1594576, %T A019495 4285239,11516085,30948148,83169572,223508615,600653577,1614187084, %U A019495 4337941272,11657715927,31328764525,84192434676,226257439900,608040726071,1634039193249 %N A019495 Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(4,11). %H A019495 Colin Barker, <a href="/A019495/b019495.txt">Table of n, a(n) for n = 0..1000</a> %H A019495 D. W. Boyd, <a href="http://www.researchgate.net/publication/258834801_Linear_recurrence_relations_for_some_generalized_Pisot_sequences">Linear recurrence relations for some generalized Pisot sequences</a>, Advances in Number Theory (Kingston ON, 1991) 333-340, Oxford Sci. Publ., Oxford Univ. Press, New York, 1993. %H A019495 <a href="/index/Ph#Pisot">Index entries for Pisot sequences</a> %p A019495 a:= proc(n) option remember; %p A019495 `if`(n<2, [4, 11][n+1], ceil(a(n-1)^2/a(n-2))-1) %p A019495 end: %p A019495 seq(a(n), n=0..30); # _Alois P. Heinz_, Sep 18 2015 %t A019495 a = {4, 11}; Do[AppendTo[a, Floor[a[[n]]^2/a[[n - 1]]]], {n, 2, 27}]; %t A019495 a (* _Michael De Vlieger_, Sep 18 2015 *) %o A019495 (PARI) T(a0, a1, maxn) = a=vector(maxn); a[1]=a0; a[2]=a1; for(n=3, maxn, a[n]=floor(a[n-1]^2/a[n-2])); a %o A019495 T(4, 11, 100) \\ _Colin Barker_, Sep 18 2015 %o A019495 (Magma) Iv:=[4,11]; [n le 2 select Iv[n] else Floor(Self(n-1)^2/Self(n-2)): n in [1..40]]; // _Bruno Berselli_, Feb 04 2016 %o A019495 (Python) %o A019495 from itertools import islice %o A019495 def A019495_gen(): # generator of terms %o A019495 a, b = 4, 11 %o A019495 yield from (a,b) %o A019495 while True: %o A019495 a, b = b, (b**2-1)//a %o A019495 yield b %o A019495 A019495_list = list(islice(A019495_gen(),30)) # _Chai Wah Wu_, Dec 06 2023 %Y A019495 See A008776 for definitions of Pisot sequences. %K A019495 nonn %O A019495 0,1 %A A019495 _R. K. Guy_