Up to the point where the sum of p and q reaches 5391, there are only 5 sets of (p,q).
list
10 for Sum=1 to 10000000
20 for P=0 to Sum
30 Q=Sum-P
40 V=1+2^P*3^Q
50 Sr=int(sqrt(V)+0.5)
60 if Sr*Sr=V then print P,Q,V,Sr
70 next
80 next
OK
produces
p q 1+2^P*3^Q sqrt(1+2^P*3^Q)
0 1 4 2
3 0 9 3
3 1 25 5
4 1 49 7
5 2 289 17
before overflowing at a sum of p and q equal to 5391.
|
Posted by Charlie
on 2010-03-19 12:58:28 |