%I M1063 N0400 #18 May 06 2015 03:37:19
%S 1,1,2,4,7,12,22,41,72,137,254,476,901,1716,3274,6286,12090,23331,
%T 45140,87511,169972,330752,644499,1257523,2456736,4804666,9405749,
%U 18429828,36141339,70928099,139295793,273741700,538277486,1059051586,2084763319,4105924366
%N Number of positive integers <= 2^n of form x^2 + 4 y^2.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H D. Shanks and L. P. Schmid, <a href="http://dx.doi.org/10.1090/S0025-5718-1966-0210678-1">Variations on a theorem of Landau. Part I</a>, Math. Comp., 20 (1966), 551-569.
%H <a href="/index/Qua#quadpop">Index entries for sequences related to populations of quadratic forms</a>
%e a(3)=4 since 2^3=8 and 1=1^2, 4=2^2=4*1^2, 5=1^2+4*1^2, 8=2^2+1*1^2.
%o (PARI) a(n)=if(n<0,0,sum(k=1,2^n,0<sum(y=0,sqrtint(k\4),issquare(k-4*y^2))))
%K nonn
%O 0,3
%A _N. J. A. Sloane_