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!)
A243650 Nonnegative integers of the form x^2+xy+12y^2. 1

%I #6 Jun 08 2014 16:07:53

%S 0,1,4,9,12,14,16,18,24,25,32,36,42,47,48,49,51,54,56,63,64,68,72,81,

%T 83,84,96,100,102,106,108,111,112,118,121,122,126,128,136,144,147,148,

%U 162,168,169,178,188,189,191,192,194,196,197,204,213,216,222,224,225,237,238,243,252,256,262,269

%N Nonnegative integers of the form x^2+xy+12y^2.

%C Discriminant -47.

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

%p fd:=proc(a,b,c,M) local dd,xlim,ylim,x,y,t1,t2,t3,t4,i;

%p dd:=4*a*c-b^2;

%p if dd<=0 then error "Form should be positive definite."; break; fi;

%p t1:={};

%p xlim:=ceil( sqrt(M/a)*(1+abs(b)/sqrt(dd)));

%p ylim:=ceil( 2*sqrt(a*M/dd));

%p for x from 0 to xlim do

%p for y from -ylim to ylim do

%p t2 := a*x^2+b*x*y+c*y^2;

%p if t2 <= M then t1:={op(t1),t2}; fi; od: od:

%p t3:=sort(convert(t1,list));

%p t4:=[];

%p for i from 1 to nops(t3) do

%p if isprime(t3[i]) then t4:=[op(t4),t3[i]]; fi; od:

%p [[seq(t3[i],i=1..nops(t3))], [seq(t4[i],i=1..nops(t4))]];

%p end;

%p fd(1,1,12,500);

%Y Primes: A033232.

%K nonn

%O 0,3

%A _N. J. A. Sloane_, Jun 08 2014

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 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)