OFFSET
0,2
COMMENTS
Numerators in approximation sqrt(2) ~ a(n)/2^n.
a(n) is the number k such that {log_2(k)} < 1/2 < {log_2(k+1)}, where { } = fractional part. Equivalently, the jump sequence of f(x) = log_2(x), in the sense that these are the positive integers k for which round(log_2(k)) < round(log_2(k+1)); see A219085. - Clark Kimberling, Jan 01 2013
Largest k such that k^2 <= 2^(2n + 1). - Irina Gerasimova, Jul 07 2013
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = floor(sqrt(2)*2^n).
a(n) = A017910(2*n+1). - Peter Luschny, Sep 20 2011
MAPLE
A084188 := n->floor(sqrt(2)*2^n); # Peter Luschny, Sep 20 2011
MATHEMATICA
Table[Floor[Sqrt[2] 2^n], {n, 0, 30}] (* Harvey P. Dale, Aug 15 2013 *)
PROG
(PARI) a(n)=floor(sqrt(2)<<n) \\ Charles R Greathouse IV, Sep 22 2011
(Haskell)
a084188 n = a084188_list !! n
a084188_list = scanl1 (\u v -> 2 * u + v) a004539_list
-- Reinhard Zumkeller, Dec 16 2013
(Magma) [Isqrt(2^(2*n+1)):n in[0..40]]; // Jason Kimberley, Oct 25 2016
(PARI) {a(n) = sqrtint(2*4^n)}; /* Michael Somos, Oct 29 2016 */
(Python)
from math import isqrt
def A084188(n): return isqrt(1<<(n<<1)+1) # Chai Wah Wu, Jan 24 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, May 18 2003
STATUS
approved