%I #15 Feb 11 2020 04:34:33
%S 0,4,7,9,13,16,19,27,28,36,37,49,52,61,63,64,67,73,76,79,81,91,97,100,
%T 103,108,112,117,124,133,139,144,148,151,163,169,171,172,175,181,189,
%U 193,196,199,208,211,217,225,241,243,244,247,252,256,259,268,271,279,292
%N Numbers of the form 4x^2 + 2xy + 7y^2.
%C Discriminant -108.
%H Charles R Greathouse IV, <a href="/A332335/b332335.txt">Table of n, a(n) for n = 1..10000</a>
%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references)
%H Naoki Uchida, <a href="https://arxiv.org/abs/2001.11632">Integers of the Form ax^2 + bxy + cy^2</a>, arXiv:2001.11632 [math.NT], 2020.
%t Select[Range[0, 300], Resolve@Exists[{x, y}, Reduce[# == (4 x^2 + 2 x y + 7 y^2), {x, y}, Integers]] &] (* _Vincenzo Librandi_, Feb 11 2020 *)
%o (PARI) is(n)=my(h2=valuation(n,2),h3=valuation(n,3),f=factor(n>>h2/3^h3),s); if(h2==0 && h3==0, s=1, if(h2%2||h3==1, return(0)); s=0); for(i=1,#f~, if(f[i,1]%3==1,if(s && !ispower(Mod(2,f[i,1]),3), s=0), f[i,2]%2,return(0))); s==0
%o (PARI) list(lim)=my(v=List(),t); lim\=1; for(x=0,sqrtint(lim\4), t=4*x^2; for(y=(-x-sqrtint(7*lim-27*x^2))\7,(1-x+sqrtint(7*lim-27*x^2))\7, listput(v,t+2*x*y+7*y^2))); select(n->n<=lim, Set(v))
%K nonn
%O 1,2
%A _Charles R Greathouse IV_, Feb 10 2020