%I #29 Jan 10 2022 12:57:36
%S 147,903,1911,3667,3913,4627,5187,8103,10137,11613,12999,13117,13467,
%T 14313,16023,16887,18723,19047,19747,20397,22197,23107,24307,25833,
%U 28227,30457,30847,31827,32403,37947,38703,39819,45163,46543,50407,57603,58813,61383,63147,68367,68403,70707,71337,74973
%N Numbers that can be represented in more than one way as p^2+p*q+q^2 with p and q primes, p<=q.
%H Robert Israel, <a href="/A349987/b349987.txt">Table of n, a(n) for n = 1..2500</a>
%e a(3) = 1911 is a term because 1911 = 5^2+5*41+41^2 = 19^2+19*31+31^2 where 5, 41, 19 and 31 are primes.
%p N:= 10^6: # for terms <= N
%p P:= select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]):
%p nP:= nops(P):
%p S:= {}: T:= {}:
%p for i from 1 to nP do
%p for j from 1 to i do
%p x:= P[i]^2 + P[i]*P[j]+P[j]^2;
%p if x > N then break fi;
%p if member(x,S) then T:= T union {x} fi;
%p S:= S union {x};
%p od od:
%p sort(convert(T,list));
%t Do[If[Total@Boole[And@@@PrimeQ[{p,q}/.Solve[p^2+p*q+q^2==k&&p>1&&p<=q,{p,q},Integers]]]>1,Print@k],{k,10^6}] (* _Giorgos Kalogeropoulos_, Jan 09 2022 *)
%Y Subsequence of A024614.
%Y Cf. A349986.
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Jan 09 2022
|