login
A243650
Nonnegative integers of the form x^2+xy+12y^2.
1
0, 1, 4, 9, 12, 14, 16, 18, 24, 25, 32, 36, 42, 47, 48, 49, 51, 54, 56, 63, 64, 68, 72, 81, 83, 84, 96, 100, 102, 106, 108, 111, 112, 118, 121, 122, 126, 128, 136, 144, 147, 148, 162, 168, 169, 178, 188, 189, 191, 192, 194, 196, 197, 204, 213, 216, 222, 224, 225, 237, 238, 243, 252, 256, 262, 269
OFFSET
0,3
COMMENTS
Discriminant -47.
LINKS
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
MAPLE
fd:=proc(a, b, c, M) local dd, xlim, ylim, x, y, t1, t2, t3, t4, i;
dd:=4*a*c-b^2;
if dd<=0 then error "Form should be positive definite."; break; fi;
t1:={};
xlim:=ceil( sqrt(M/a)*(1+abs(b)/sqrt(dd)));
ylim:=ceil( 2*sqrt(a*M/dd));
for x from 0 to xlim do
for y from -ylim to ylim do
t2 := a*x^2+b*x*y+c*y^2;
if t2 <= M then t1:={op(t1), t2}; fi; od: od:
t3:=sort(convert(t1, list));
t4:=[];
for i from 1 to nops(t3) do
if isprime(t3[i]) then t4:=[op(t4), t3[i]]; fi; od:
[[seq(t3[i], i=1..nops(t3))], [seq(t4[i], i=1..nops(t4))]];
end;
fd(1, 1, 12, 500);
CROSSREFS
Primes: A033232.
Sequence in context: A112652 A272933 A367929 * A140399 A312849 A161544
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 08 2014
STATUS
approved