OFFSET
1,1
COMMENTS
The only square in this sequence is 49.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Mathematics StackExchange, Largest square written as p^2+pq+q^2 where p, q are primes?
EXAMPLE
a(3) = 27 is a term because 27 = 3^2+3*3+3^2.
a(4) = 39 is a term because 39 = 2^2+2*5+5^2.
MAPLE
N:= 10^4: # for terms <= N
P:= select(isprime, [2, seq(i, i=3..floor(sqrt(N)), 2)]):
nP:= nops(P):
S:= {}:
for i from 1 to nP do
for j from 1 to i do
x:= P[i]^2 + P[i]*P[j]+P[j]^2;
if x > N then break fi;
S:= S union {x};
od od:
sort(convert(S, list));
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 09 2022
STATUS
approved