login
A243680
Nonnegative integers of the form 2x^2+xy+5y^2.
1
0, 2, 5, 6, 8, 11, 15, 18, 20, 24, 26, 32, 33, 41, 44, 45, 47, 50, 54, 59, 60, 65, 71, 72, 78, 80, 83, 86, 89, 96, 98, 99, 104, 110, 122, 123, 125, 128, 132, 135, 137, 141, 143, 149, 150, 158, 162, 164, 167, 176, 177, 180, 188, 195, 197, 200, 206, 213, 215, 216, 227, 234, 236, 239, 240, 242, 245
OFFSET
0,2
COMMENTS
Discriminant -39.
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(2, 1, 5, 500);
CROSSREFS
Primes: A106886.
Sequence in context: A026179 A300063 A230902 * A280381 A333965 A105107
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 08 2014
STATUS
approved