%I #19 Feb 08 2020 15:35:18
%S 4,5,7,8,10,11,13,15,17,19,20,22,23,25,27,28,29,31,32,35,37,38,40,41,
%T 43,45,47,49,53,55,59,61,63,65,67,68,70,71,73,75,77,79,82,83,85,87,89,
%U 91,92,95,97,98,101,103,105,107,109,110,112,113,115,117,118
%N Integers n such that n^2 can be represented as 2p + 3q with p and q primes not necessarily distinct.
%H Zak Seidov, <a href="/A219958/b219958.txt">Table of n, a(n) for n = 1..115</a>
%e 4^2 = 16 = 2*5 + 3*2,
%e 5^2 = 25 = 2*5 + 3*5,
%e 7^2 = 49 = 2*5 + 3*13.
%e In case of multiple solutions (as for 5^2 and 7^2) just one solution (with least p) is shown.
%t mx = 50000; Select[Sqrt[Union[Reap[Do[p = Prime[k]; Do[ Sow[ 2 Prime[i] + 3 p], {i, PrimePi[(mx - 3 p)/2]}], {k, PrimePi[(mx - 4)/3]}]][[2, 1]]]], IntegerQ]; (*for first 115 terms *)
%t Take[Union[Select[Sqrt[2#[[1]]+3#[[2]]]&/@Tuples[Prime[ Range[1000]], 2], IntegerQ]],70] (* _Harvey P. Dale_, Feb 08 2020 *)
%Y Cf. A079026, A219955, A219956, A219957.
%K nonn
%O 1,1
%A _Zak Seidov_, Dec 02 2012