login
A244037
Numbers of the form x^2+14y^2.
3
0, 1, 4, 9, 14, 15, 16, 18, 23, 25, 30, 36, 39, 49, 50, 56, 57, 60, 63, 64, 65, 72, 78, 81, 92, 95, 100, 105, 114, 120, 121, 126, 127, 130, 135, 137, 142, 144, 151, 156, 158, 162, 169, 175, 177, 183, 190, 196, 200, 207, 210, 224, 225, 226, 228, 233, 239, 240, 247, 249, 252, 256, 260, 270, 273, 281
OFFSET
1,3
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, 0, 14, 500);
# Alternative:
N:= 1000: # for terms <= N
sort(convert({seq(seq(x^2+14*y^2, y=0..floor(sqrt((N-x^2)/14))), x=0..floor(sqrt(N)))}, list)); # Robert Israel, Sep 30 2020
MATHEMATICA
M = 1000; (* for terms <= M *)
Table[x^2 + 14 y^2, {x, 0, Floor@Sqrt[M]}, {y, 0, Floor@Sqrt[(M - x^2)/14]}] // Flatten // Union (* Jean-François Alcover, Feb 08 2023, after Robert Israel *)
CROSSREFS
For primes see A033211.
Sequence in context: A102776 A140343 A279230 * A091880 A141560 A071864
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 28 2014
STATUS
approved