login
Number of positive integers <= 2^n of form x^2 + 3 y^2.
(Formerly M2350 N0928)
1

%I M2350 N0928 #28 Apr 29 2022 12:15:21

%S 1,1,3,4,8,14,25,45,82,151,282,531,1003,1907,3645,6993,13456,25978,

%T 50248,97446,189291,368338,717804,1400699,2736534,5352182,10478044,

%U 20531668,40264582,79022464,155196838,304997408,599752463,1180027022,2322950591,4575114295

%N Number of positive integers <= 2^n of form x^2 + 3 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 Seth A. Troisi, <a href="/A000205/b000205.txt">Table of n, a(n) for n = 0..45</a>

%H P. Moree and H. J. J. te Riele, <a href="https://arxiv.org/abs/math/0204332">The hexagonal versus the square lattice</a>, arXiv:math/0204332 [math.NT], 2002.

%H P. Moree and H. J. J. te Riele, <a href="http://dx.doi.org/10.1090/S0025-5718-03-01556-4">The hexagonal versus the square lattice</a>, Math. Comp. 73 (2004), no. 245, 451-473.

%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>

%t (* This program is not suitable to compute more than a score of terms. *)

%t a[0] = a[1] = 1; a[n_] := a[n] = Module[{cnt, k, r, x, y}, For[cnt = a[n-1]; k = 2^(n-1)+1, k <= 2^n, k++, r = Reduce[x >= 0 && y >= 0 && k == x^2 + 3 y^2, {x, y}, Integers]; If[r =!= False, cnt++]]; cnt];

%t Table[Print[n, " ", a[n]]; a[n], {n, 0, 20}] (* _Jean-François Alcover_, Jan 23 2019 *)

%Y Cf. A000050, A003136.

%K nonn

%O 0,3

%A _N. J. A. Sloane_