login
A293362
Greatest integer k such that k/2^n < log 2.
3
0, 1, 2, 5, 11, 22, 44, 88, 177, 354, 709, 1419, 2839, 5678, 11356, 22713, 45426, 90852, 181704, 363408, 726817, 1453634, 2907269, 5814539, 11629079, 23258159, 46516319, 93032639, 186065279, 372130558, 744261117, 1488522235, 2977044471, 5954088943
OFFSET
0,3
LINKS
FORMULA
a(n) = floor(r*2^n), where r = log 2.
a(n) =A293363(n) - 1.
FromGreg Huber,Feb 13 2019: (Start)
a(n) = nearest integer to the integral dx/sin(x) from Pi/(2^(2^n)) to Pi/2.
a(n) = nearest integer to -log(tan(Pi/(2^(2^n+1)))) (follows from the integral formula). (End)
MATHEMATICA
z = 120; r = Log[2];
Table[Floor[r*2^n], {n, 0, z}]; (*A293362*)
Table[Ceiling[r*2^n], {n, 0, z}]; (*A293363*)
Table[Round[r*2^n], {n, 0, z}]; (*A293364*)
PROG
(PARI) {a(n) = (log(2)*2^n)\1 }; \\G. C. Greubel,Feb 13 2019
(Magma) [Floor(Log(2)*2^n): n in [0..40]]; //G. C. Greubel,Feb 13 2019
(Sage) [floor(log(2)*2^n) for n in range(40)] #G. C. Greubel,Feb 13 2019
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling,Oct 11 2017
STATUS
approved