login
The integer k that minimizes |k/2^n - sqrt(1/5)|.
3

%I #6 Dec 11 2023 10:44:25

%S 0,1,2,4,7,14,29,57,114,229,458,916,1832,3664,7327,14654,29309,58617,

%T 117234,234469,468937,937875,1875750,3751500,7502999,15005998,

%U 30011996,60023993,120047985,240095971,480191942,960383883,1920767767,3841535534,7683071068

%N The integer k that minimizes |k/2^n - sqrt(1/5)|.

%H Clark Kimberling, <a href="/A293336/b293336.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = floor(1/2 + r*2^n), where r = sqrt(1/5).

%F a(n) = A293334(n) if (fractional part of r*2^n) < 1/2, else a(n) = A293335(n).

%t z = 120; r = Sqrt[1/5];

%t Table[Floor[r*2^n], {n, 0, z}]; (* A293334 *)

%t Table[Ceiling[r*2^n], {n, 0, z}]; (* A293335 *)

%t Table[Round[r*2^n], {n, 0, z}]; (* A293336 *)

%Y Cf. A001633, A293333, A293334, A293335.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, Oct 10 2017