login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A190568 Number of squares between powers of 2, floor(sqrt(2^(n+1))) - floor(sqrt(2^n)) 3

%I #24 Sep 08 2022 08:45:57

%S 1,0,1,0,2,1,3,3,5,6,10,13,19,26,38,53,75,106,150,212,300,424,600,848,

%T 1200,1696,2400,3393,4799,6786,9598,13572,19196,27145,38391,54291,

%U 76781,108583,153561,217167,307121,434334,614242,868668,1228484,1737337,2456967,3474675,4913933

%N Number of squares between powers of 2, floor(sqrt(2^(n+1))) - floor(sqrt(2^n))

%C A190568(n)/A190568(n-1) converges to sqrt(2) (A002193). - _John W. Nicholson_, May 15 2011

%H Charles R Greathouse IV, <a href="/A190568/b190568.txt">Table of n, a(n) for n = -1..6646</a>

%F a(n) = floor(sqrt(2^(n+1))) - floor(sqrt(2^n)).

%e Between 2^6=64 and 2^(6+1)=128 are the squares 81=9^2, 100=10^2, 121=11^2, so a(n)=3

%t Table[Floor[Sqrt[2^(n + 1)]] - Floor[Sqrt[2^n]], {n, -1, 120}] (* _G. C. Greubel_, Aug 19 2018 *)

%o (PARI) a(n)=sqrtint(1<<(n+1))-sqrtint(1<<n) \\ _Charles R Greathouse IV_, May 12 2011

%o (Magma) [Floor(Sqrt(2^(n+1))) - Floor(Sqrt(2^n)): n in [-1..50]]; // _G. C. Greubel_, Aug 19 2018

%Y Cf. A000079, A000290

%K nonn,easy

%O -1,5

%A _John W. Nicholson_, May 12 2011

%E Definition corrected by _Bruno Berselli_, May 13 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)