A017910 Powers of sqrt(2) rounded down.
1, 1, 2, 2, 4, 5, 8, 11, 16, 22, 32, 45, 64, 90, 128, 181, 256, 362, 512, 724, 1024, 1448, 2048, 2896, 4096, 5792, 8192, 11585, 16384, 23170, 32768, 46340, 65536, 92681, 131072, 185363, 262144, 370727, 524288
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Kival Ngaokrajang, Illustration of initial terms.
- Kival Ngaokrajang, Illustration of Heighway dragon for n = 0..5.
- Wikipedia, Dragon curve.
Programs
-
Magma
[Floor(Sqrt(2^n)): n in [0..40]]; // Vincenzo Librandi, Nov 20 2011
-
Magma
[Isqrt(2^n):n in[0..40]]; // Jason Kimberley, Oct 25 2016
-
Maple
A017910 := n->floor(sqrt(2^n)); # Peter Luschny, Sep 20 2011
-
Mathematica
Floor[(Sqrt[2])^Range[0,40]] (* Vincenzo Librandi, Nov 20 2011 *)
-
PARI
a(n)=sqrtint(2^n) \\ Charles R Greathouse IV, Sep 22 2011
-
Python
from math import isqrt def A017910(n): return isqrt(1<
>1) # Chai Wah Wu, Jul 26 2022
Formula
a(n) = A017912(n)-1 if n is odd. a(n) = A017912(n) = 2^(n/2) if n is even. - Chai Wah Wu, Jul 26 2022
Comments