OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
N:= 10^4: # to get terms <= N
P:= select(isprime, [2, seq(i, i=3..floor((N/2)^(1/2)))]):
m:= nops(P):
R:= {}:
for p in P do
for i from 2 to m while 3*P[i]^2 <= N - 2*p^2 do
v:= 2*p^2 + 3*P[i]^2;
if isprime(v) then R:= R union {v} fi
od od:
sort(convert(R, list)); # Robert Israel, Nov 05 2020
MATHEMATICA
nn = 10^4; (* to get terms <= nn *)
P = Select[Join[{2}, Range[3, Floor[Sqrt[nn/2]]]], PrimeQ];
m = Length[P];
R = {};
Do[For[i = 2, 3*P[[i]]^2 <= nn - 2*p^2, i++,
v = 2*p^2 + 3*P[[i]]^2;
If[PrimeQ[v], R = R ~Union~ {v}]],
{p, P}];
Sort[R] (* Jean-François Alcover, Dec 13 2021, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 10 2003
STATUS
approved