Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #32 Jun 19 2024 01:52:42
%S 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,741455,1048576
%N a(n) = A017911(n+1) = round(sqrt(2)^(n+1)).
%C If the natural numbers A000027 are written as a triangle, then a(n) gives the row of the triangle in which the number 2^n can be found. See A017911 for a more elaborate explanation and relation with A000217. [Original definition by Clark Kimberling, Jul 30 2000, clarified by _M. F. Hasler_, Feb 20 2012, following an observation from _T. D. Noe_, Apr 27 2003]
%H Vincenzo Librandi, <a href="/A057048/b057048.txt">Table of n, a(n) for n = 0..1000</a>
%F a(2n-1) = 2^n, n > 0. - _M. F. Hasler_, Feb 20 2012
%e Write the natural numbers A000027 as a triangle:
%e row 1: 1 . . . <- 2^0 in row 1=a(0)
%e row 2: 2 3 . . . <- 2^1 in row 2=a(1)
%e row 3: 4 5 6 . . . <- 2^2 in row 3=a(2)
%e row 4: 7 8 9 10 . . <- 2^3 in row 4=a(3)
%e row 5: 11 12 13 14 15
%e row 6: 16 17 18 19 20 21 <- 2^4 in row 6=a(4).
%t Table[Round[Sqrt[2]^(n+1)], {n, 0, 50}] (* _Vincenzo Librandi_, Mar 24 2013 *)
%o (PARI) A057048(n)=round(sqrt(2^(n+1))) /* for large values, an implementation using integer arithmetic would be preferable */ \\ _M. F. Hasler_, Feb 20 2012
%o (PARI) a(n)=sqrtint(2^(n+1)) \\ _Charles R Greathouse IV_, Aug 19 2016
%o (Magma) [Round(Sqrt(2)^(n+1)): n in [0..50]]; // _Vincenzo Librandi_, Mar 24 2013
%o (Python)
%o from math import isqrt
%o def A057048(n): return -isqrt(m:=1<<n+1)+isqrt(m<<2) # _Chai Wah Wu_, Jun 18 2024
%K nonn,easy
%O 0,2
%A _M. F. Hasler_, Feb 20 2012