X and Y are 9 and 40 respectively.
DEFDBL A-Z
FOR n1 = 3 TO 100
sr = INT(SQR(n1 + 1))
DO
sum = sr * sr
n2 = sum - n1
IF n2 > 0 THEN
a1 = 180 - (360 / n1)
a2 = 180 - (360 / n2)
IF a2 - a1 = n2 - n1 THEN PRINT n1; n2, a1; a2
END IF
sr = sr + 1
LOOP UNTIL sr > 1000
NEXT
The program checks that X+Y is a perfect square and that the difference, in degrees, in the internal angle equals the difference of the number of sides.
The output:
8 8 135 135
9 40 140 171
18 18 160 160
32 32 168.75 168.75
40 9 171 140
50 50 172.8 172.8
72 72 175 175
98 98 176.3265306122449 176.3265306122449
shows only one instance where Y>X-- that is, X=9 and Y=40.
From Enigma No. 1513, by Richard England, New Scientist, 27 September 2008. |