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!)
A000021 Number of positive integers <= 2^n of form x^2 + 12 y^2.
(Formerly M0357 N0134)
3

%I M0357 N0134 #33 Jul 08 2023 01:18:25

%S 1,1,2,2,6,9,17,30,54,98,183,341,645,1220,2327,4451,8555,16489,31859,

%T 61717,119779,232919,453584,884544,1727213,3376505,6607371,12942012,

%U 25371540,49777187,97731027,192010355,377475336,742512992,1461352025,2877572478,5668965407

%N Number of positive integers <= 2^n of form x^2 + 12 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 Delbert L. Johnson, <a href="/A000021/b000021.txt">Table of n, a(n) for n = 0..45</a>

%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(4)=6 since 2^4=16 and 1=1^2, 4=2^2, 9=3^2, 12=12*1^2, 13=1^2+12*1^2, 16=4^2.

%o (PARI) a(n)=if(n<0,0,sum(k=1,2^n,0<sum(y=0,sqrtint(k\12),issquare(k-12*y^2))))

%o (PARI) a(n)=local(A);if(n<0,0,A=qfrep([1,0;0,12],2^n);sum(k=1,2^n,A[k]!=0))

%o (Haskell)

%o a000021 n = length [() | k <- [1..2^n],

%o sum [a010052 (k - 12*y^2) | y <- [0..a000196 (k `div` 12)]] > 0]

%o -- _Reinhard Zumkeller_, Apr 16 2012

%Y Cf. A000196, A010052, A272933.

%K nonn

%O 0,3

%A _N. J. A. Sloane_

%E More terms from _David W. Wilson_, Feb 07 2000

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 April 19 09:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)