74 and 95
the two factorization of
semiprimes diff sum the semiprimes involved
Alice or Betty: 26 95 69 121 2 * 13, 5 * 19, 3 * 23
Betty or Alice: 35 86 51 121 5 * 7, 2 * 43, 3 * 17
Carol's: 74 95 21 169 2 * 37, 5 * 19, 3 * 7
isSemiPrime[n] :=
{
tst=factor[n]
answ=false
if length[tst]==2
{
if tst@0@1==1 and tst@1@1==1
answ=true
}
// The below section commented out as these semiprimes
// must have unique prime factors
//
// if length[tst]==1
// {
// if tst@0@1==2
// answ=true
// }
return answ
}
for n1=10 to 99
if isSemiPrime[n1]
{
for n2=n1+1 to 99
{
if isSemiPrime[n2]
{
diff=n2-n1
sqtst=n1+n2
sr=int[sqrt[sqtst]+.5]
if isSemiPrime[diff] and sr*sr==sqtst
{
f1=factor[n1]; f2=factor[n2]; fd=factor[diff];
println["$n1 $n2 $diff $sqtst $f1 $f2 $fd"]
}
}
}
}
14 35 21 49 [[2, 1], [7, 1]] [[5, 1], [7, 1]] [[3, 1], [7, 1]]
15 21 6 36 [[3, 1], [5, 1]] [[3, 1], [7, 1]] [[2, 1], [3, 1]]
26 95 69 121 [[2, 1], [13, 1]] [[5, 1], [19, 1]] [[3, 1], [23, 1]]
35 86 51 121 [[5, 1], [7, 1]] [[2, 1], [43, 1]] [[3, 1], [17, 1]]
74 95 21 169 [[2, 1], [37, 1]] [[5, 1], [19, 1]] [[3, 1], [7, 1]]
The bracketed arrays show pairs of numbers, the first of which is the prime factor, and the second of which is the power to which that factor is raised, which, in this case, is always 1.
The two with equal sums are the two with sum 121. The only remaining set with unique prime factors is the last.
Based on Enigma No. 1633, "Same perfect square", by Richard England, New Scientist, 12 February 2011. |