Find all the pairs of positive numbers such that the last
digit of their sum is 3, their difference is a prime number and
their product is a perfect square.
Call the pair (p,q).
For the last digit of the sum to end in 3, the last digit of p and q can be:
a) 1,2
b) 6,7
c) 5,8
d) 4,9
Eliminate the first two sets 'a' and 'b', because in each of those cases, the product ends in 2, but no squares end in 2.
Eliminate the last set, 'd', because whichever is the larger number, the difference will always be 5, and no primes end in 5.
So p and q may only end in 5 and 8.
But 'c', can also be eliminated. Whichever of p or q ends in 5 must have an odd number of 5's in its prime factorization. And the one ending in 8 has no prime factors which is a 5. Thus the product p*q has an odd number of 5's in its prime factorization and so cannot be a square.
Furthermore, a program testing p's and q's up to 100,000 shows no solutions.

Posted by Larry
on 20201219 10:43:45 