%I #43 Jun 18 2024 19:54:15
%S 1,1,2,3,4,6,8,11,16,23,32,45,64,91,128,181,256,362,512,724,1024,1448,
%T 2048,2896,4096,5793,8192,11585,16384,23170,32768,46341,65536,92682,
%U 131072,185364,262144,370728,524288
%N Powers of sqrt(2) rounded to nearest integer.
%C Apart from offset the same as A057048. - _T. D. Noe_, Apr 27 2003
%C Indeed, write the natural numbers as triangle, [1; 2, 3; 4, 5, 6; ...], then the last number in each row is T(n) = n(n+1)/2 = A000217(n), and 2^k is located in the row n with n(n-1)/2 < 2^k <= n(n+1)/2 <=> n^2 - n < 2^(k+1) <= n^2 + n, which means that n = round(sqrt(2^(k+1))). - _M. F. Hasler_, Feb 20 2012
%C The rounded curvature of circle in square inscribing or the rounded radius of circle in square circumscribing with initial circle radius = 1 for both cases, see illustration in link. - _Kival Ngaokrajang_, Aug 07 2013
%C Even-indexed terms are powers of 2.
%H Vincenzo Librandi, <a href="/A017911/b017911.txt">Table of n, a(n) for n = 0..5000</a>
%H Kival Ngaokrajang, <a href="/A017911/a017911.jpg">Illustration of initial terms of square inscribing</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PolygonInscribing.html">Polygon Inscribing</a>
%e sqrt(2)^3 = 2.82842712474619..., so a(3) = 3.
%e sqrt(2)^4 = 4, so a(4) = 4.
%e sqrt(2)^5 = 5.6568542494923801952..., so a(5) = 6.
%e sqrt(2)^6 = 8, so a(6) = 8.
%e sqrt(2)^7 = 11.31370849898476..., so a(7) = 11.
%t Floor[(Sqrt[2]^Range[0, 40] + 1/2)] (* _Vincenzo Librandi_, Nov 19 2011 *)
%o (PARI) a(n)=round(sqrt(2)^n) \\ _Charles R Greathouse IV_, Nov 18 2011
%o (Magma) [Round(Sqrt(2)^n): n in [0..40]]; // _Vincenzo Librandi_, Nov 19 2011
%o (Python)
%o from math import isqrt
%o def A017911(n): return -isqrt(m:=1<<n)+isqrt(m<<2) # _Chai Wah Wu_, Jun 18 2024
%Y Cf. A000079, A057048.
%Y Apart from offset, first differences of A001521.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_
|