login
A219958
Integers n such that n^2 can be represented as 2p + 3q with p and q primes not necessarily distinct.
4
4, 5, 7, 8, 10, 11, 13, 15, 17, 19, 20, 22, 23, 25, 27, 28, 29, 31, 32, 35, 37, 38, 40, 41, 43, 45, 47, 49, 53, 55, 59, 61, 63, 65, 67, 68, 70, 71, 73, 75, 77, 79, 82, 83, 85, 87, 89, 91, 92, 95, 97, 98, 101, 103, 105, 107, 109, 110, 112, 113, 115, 117, 118
OFFSET
1,1
EXAMPLE
4^2 = 16 = 2*5 + 3*2,
5^2 = 25 = 2*5 + 3*5,
7^2 = 49 = 2*5 + 3*13.
In case of multiple solutions (as for 5^2 and 7^2) just one solution (with least p) is shown.
MATHEMATICA
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 *)
Take[Union[Select[Sqrt[2#[[1]]+3#[[2]]]&/@Tuples[Prime[ Range[1000]], 2], IntegerQ]], 70] (* Harvey P. Dale, Feb 08 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Dec 02 2012
STATUS
approved