The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 2
6, 66, 727, 8009, 88232, 972018, 10708349, 117969769, 1299627646, 14317498734, 157730385799, 1737655093709, 19143078927992, 210891949829430, 2323315631208341, 25595076182769253, 281971126093205254, 3106367622527151978, 34221659288246953735, 377006879658404795777 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
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
LINKS
FORMULA
a(n+1) = floor(a(n)^2/a(n-1))+1 for all n > 0. - M. F. Hasler, Feb 10 2016
MAPLE
A022024 := proc(n)
option remember;
if n <= 1 then
op(n+1, [6, 66]) ;
else
a := procname(n-1)^2/procname(n-2) ;
if type(a, 'integer') then
a+1 ;
else
ceil(a) ;
fi;
end if;
end proc: # R. J. Mathar, Feb 10 2016
MATHEMATICA
a[n_] := a[n] = Switch[n, 0, 6, 1, 66, _, Floor[a[n-1]^2/a[n-2]]+1];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 08 2024 *)
PROG
(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
(Python)
def a(n):
if n == 0: return 6
prev_1, prev_2 = 66, 6
for i in range(2, n + 1):
prev_2, prev_1 = prev_1, (prev_1 ** 2) // prev_2 + 1
return prev_1 # Paul Muljadi, Feb 12 2024
CROSSREFS
Sequence in context: A213453 A186671 A131519 * A186666 A129554 A165229
KEYWORD
nonn
AUTHOR
EXTENSIONS
Double-checked and extended to 3 lines of data by M. F. Hasler, Feb 10 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 19:53 EDT 2024. Contains 372533 sequences. (Running on oeis4.)