login
Number of squares <= 2^n.
2

%I #21 Sep 08 2022 08:45:32

%S 2,2,3,3,5,6,9,12,17,23,33,46,65,91,129,182,257,363,513,725,1025,1449,

%T 2049,2897,4097,5793,8193,11586,16385,23171,32769,46341,65537,92682,

%U 131073,185364,262145,370728,524289,741456,1048577,1482911,2097153

%N Number of squares <= 2^n.

%H Vincenzo Librandi, <a href="/A136417/b136417.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = 1 + A017910(n). - _R. J. Mathar_, Apr 04 2008

%t 1 + Floor[(Sqrt[2])^Range[0, 50]] (* _Vincenzo Librandi_, Aug 06 2014 *)

%o (PARI) a(n) = for(k=0,2^(n+1),if(k^2 > 2^n, return(k)))

%o vector(50, n, a(n-1)) \\ _Derek Orr_, Aug 05 2014

%o (Magma) [1+Floor(Sqrt(2^n)): n in [0..45]]; // _Vincenzo Librandi_, Aug 06 2014

%Y Cf. A000079.

%K nonn

%O 0,1

%A _Giovanni Teofilatto_, Apr 01 2008

%E More terms from _R. J. Mathar_, Apr 04 2008