login
A293331
Greatest integer k such that k/2^n < sqrt(5).
4
2, 4, 8, 17, 35, 71, 143, 286, 572, 1144, 2289, 4579, 9158, 18317, 36635, 73271, 146542, 293085, 586171, 1172343, 2344687, 4689374, 9378748, 18757497, 37514995, 75029990, 150059981, 300119963, 600239927, 1200479854, 2400959708, 4801919417, 9603838834
OFFSET
0,1
LINKS
FORMULA
a(n) = floor(r*2^n), where r = sqrt(5).
a(n) = A293332(n) - 1.
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 A293331(n): return isqrt(5*(1<<(n<<1))) # Chai Wah Wu, Jul 28 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 10 2017
STATUS
approved