A084188 a(0)=1, a(n+1) = 2*a(n) + b(n+2), where b(n)=A004539(n) is the n-th bit in the binary expansion of sqrt(2).
1, 2, 5, 11, 22, 45, 90, 181, 362, 724, 1448, 2896, 5792, 11585, 23170, 46340, 92681, 185363, 370727, 741455, 1482910, 2965820, 5931641, 11863283, 23726566, 47453132, 94906265, 189812531, 379625062, 759250124
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
Programs
-
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
-
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 *)
-
PARI
a(n)=floor(sqrt(2)<
Charles R Greathouse IV, Sep 22 2011 -
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
Formula
a(n) = floor(sqrt(2)*2^n).
a(n) = A017910(2*n+1). - Peter Luschny, Sep 20 2011
Comments