%I #22 Sep 08 2022 08:46:19
%S 2,3,6,13,26,52,104,207,414,828,1657,3314,6627,13255,26510,53020,
%T 106039,212079,424158,848316,1696632,3393263,6786526,13573053,
%U 27146106,54292211,108584423,217168846,434337692,868675383,1737350766,3474701533,6949403065
%N The integer k that minimizes |k/2^n - r|, where r = golden ratio.
%H Clark Kimberling, <a href="/A293315/b293315.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = floor(1/2 + r*2^n), where r = (1+sqrt(5))/2.
%F a(n) = A293313(n) if (fractional part of r*2^n) < 1/2, else a(n) = A293313(n).
%p A293315:=n->floor(1/2+2^n*(1+sqrt(5))/2): seq(A293315(n), n=0..40); # _Wesley Ivan Hurt_, Oct 06 2017
%t z = 120; r = GoldenRatio;
%t Table[Floor[r*2^n], {n, 0, z}]; (* A293313 *)
%t Table[Ceiling[r*2^n], {n, 0, z}]; (* A293314 *)
%t Table[Round[r*2^n], {n, 0, z}]; (* A293315 *)
%o (PARI) a(n) = (2^n*(1+sqrt(5))+1)\2; \\ _Altug Alkan_, Oct 06 2017
%o (Magma) [Floor((2^n*(1+Sqrt(5))+1)/2): n in [0..33]]; // _Vincenzo Librandi_, Oct 08 2017
%Y Cf. A001622, A293313, A293314.
%K nonn,easy
%O 0,1
%A _Clark Kimberling_, Oct 06 2017