N=x 2+y2+10 z2 (x,y,z integers).
Find N .
Hint: N < 5000.
No Solution Yet | Submitted by Ady TZIDON |
No Rating |
computer solution |
|
DEFDBL A-Z
OPEN "below5k.txt" FOR OUTPUT AS #2
FOR x = 0 TO 100
FOR y = 0 TO 100
FOR z = 0 TO 32
PRINT #2, USING "##########"; x * x + y * y + 10 * z * z
NEXT
NEXT
NEXT
CLOSE
SHELL "sort < below5k.txt > below5ks.txt"
OPEN "below5ks.txt" FOR INPUT AS #1
DO
pn = n
INPUT #1, n
IF n - pn > 1 AND n < 10000 AND n MOD 2 = 0 THEN max = n - 1
LOOP UNTIL EOF(1)
CLOSE
PRINT max
finds
2719
The program was designed to find any such maximum up to about 10,000, as each term is allowed to go up to at least that value, and is combined with both other such terms. After 10,000, spurious gaps can occur and are therefore not reported.
According to the Wikipedia article on 2719, it is a conjecture that this is indeed the largest number not formable as described, stating "This conjecture is now known to be true if the generalized Riemann hypothesis is true."
It also states that "The odd integers which are not of the form x2 + y2 + 10z2 are: 3, 7, 21, 31, 33, 43, 67, 79, 87, 133, 217, 219, 223, 253, 307, 391, 679, 2719," and that the conjecture has been verified up to 2 x 10^10.
Posted by Charlie on 2013-01-28 15:33:51 |