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!)
A293333 The integer k that minimizes |k/2^n - sqrt(5)|. 4
2, 4, 9, 18, 36, 72, 143, 286, 572, 1145, 2290, 4579, 9159, 18318, 36636, 73271, 146543, 293086, 586172, 1172344, 2344687, 4689374, 9378749, 18757498, 37514995, 75029991, 150059982, 300119964, 600239927, 1200479854, 2400959709, 4801919417, 9603838835 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = floor(1/2 + r*2^n), where r = sqrt(5).
a(n) = A293331(n) if (fractional part of r*2^n) < 1/2, else a(n) = A293332(n).
MATHEMATICA
z = 120; r = Sqrt[5];
Table[Floor[r*2^n], {n, 0, z}]; (* A293331 *)
Table[Ceiling[r*2^n], {n, 0, z}]; (* A293332 *)
Table[Round[r*2^n], {n, 0, z}]; (* A293333 *)
PROG
(Python)
from math import isqrt
def A293333(n): return (k:=isqrt(m:=5*(1<<(n<<1))))+int((m-k*(k+1)<<2)-1>=0) # Chai Wah Wu, Jul 28 2022
CROSSREFS
Sequence in context: A138196 A298404 A101351 * A111662 A253585 A119027
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 10 2017
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 April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)