OFFSET
0,3
COMMENTS
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
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
Even-indexed terms are powers of 2.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..5000
Kival Ngaokrajang, Illustration of initial terms of square inscribing
Eric Weisstein's World of Mathematics, Polygon Inscribing
EXAMPLE
sqrt(2)^3 = 2.82842712474619..., so a(3) = 3.
sqrt(2)^4 = 4, so a(4) = 4.
sqrt(2)^5 = 5.6568542494923801952..., so a(5) = 6.
sqrt(2)^6 = 8, so a(6) = 8.
sqrt(2)^7 = 11.31370849898476..., so a(7) = 11.
MATHEMATICA
Floor[(Sqrt[2]^Range[0, 40] + 1/2)] (* Vincenzo Librandi, Nov 19 2011 *)
PROG
(PARI) a(n)=round(sqrt(2)^n) \\ Charles R Greathouse IV, Nov 18 2011
(Magma) [Round(Sqrt(2)^n): n in [0..40]]; // Vincenzo Librandi, Nov 19 2011
(Python)
from math import isqrt
def A017911(n): return -isqrt(m:=1<<n)+isqrt(m<<2) # Chai Wah Wu, Jun 18 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved