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 A022024 #40 Feb 14 2024 10:46:49 %S A022024 6,66,727,8009,88232,972018,10708349,117969769,1299627646,14317498734, %T A022024 157730385799,1737655093709,19143078927992,210891949829430, %U A022024 2323315631208341,25595076182769253,281971126093205254,3106367622527151978,34221659288246953735,377006879658404795777 %N A022024 Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(6,66). %C A022024 This coincides with the linearly recurrent sequence defined by the expansion of (6 - 5*x^2)/(1 - 11*x - x^2 + 9*x^3) only up to n <= 169. - _Bruno Berselli_, Feb 11 2016 %H A022024 Colin Barker, <a href="/A022024/b022024.txt">Table of n, a(n) for n = 0..950</a> %F A022024 a(n+1) = floor(a(n)^2/a(n-1))+1 for all n > 0. - _M. F. Hasler_, Feb 10 2016 %p A022024 A022024 := proc(n) %p A022024 option remember; %p A022024 if n <= 1 then %p A022024 op(n+1,[6,66]) ; %p A022024 else %p A022024 a := procname(n-1)^2/procname(n-2) ; %p A022024 if type(a,'integer') then %p A022024 a+1 ; %p A022024 else %p A022024 ceil(a) ; %p A022024 fi; %p A022024 end if; %p A022024 end proc: # _R. J. Mathar_, Feb 10 2016 %t A022024 a[n_] := a[n] = Switch[n, 0, 6, 1, 66, _, Floor[a[n-1]^2/a[n-2]]+1]; %t A022024 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Feb 08 2024 *) %o A022024 (PARI) a=[6,66];for(n=2,30,a=concat(a,a[n]^2\a[n-1]+1));a \\ _M. F. Hasler_, Feb 10 2016 %o A022024 (Python) %o A022024 def a(n): %o A022024 if n == 0: return 6 %o A022024 prev_1, prev_2 = 66, 6 %o A022024 for i in range(2, n + 1): %o A022024 prev_2, prev_1 = prev_1, (prev_1 ** 2) // prev_2 + 1 %o A022024 return prev_1 # _Paul Muljadi_, Feb 12 2024 %Y A022024 Cf. A022018 - A022025, A022026 - A022032. %K A022024 nonn %O A022024 0,1 %A A022024 _R. K. Guy_ %E A022024 Double-checked and extended to 3 lines of data by _M. F. Hasler_, Feb 10 2016