.
.
.
Код:
? for(m=1,1000, m1=m*m+m+1; for(x=1,10^9, x1=(4*x+1)^2; if(x1>=m1, break); for(y=1,10^9, y1=4*y^2; if(y1>=m1, break); if(x1+y1==m1, printf("m=%d, x=%d, y=%d\n",m,x,y); next) ) ) )
m=24, x=1, y=12
m=27, x=2, y=13
m=47, x=10, y=12
m=59, x=6, y=27
m=63, x=14, y=14
m=68, x=14, y=19
m=71, x=13, y=24
m=80, x=2, y=40
m=84, x=16, y=27
m=108, x=9, y=51
m=119, x=21, y=42
m=132, x=10, y=63
m=132, x=30, y=27
m=147, x=5, y=73
m=152, x=17, y=68
m=155, x=10, y=75
m=167, x=15, y=78
m=168, x=3, y=84
m=176, x=38, y=44
m=195, x=47, y=25
m=204, x=21, y=93
m=224, x=50, y=50
m=227, x=55, y=27
m=231, x=23, y=106
m=243, x=53, y=59
m=248, x=53, y=64
m=263, x=19, y=126
m=272, x=50, y=92
m=275, x=61, y=63
m=276, x=48, y=99
m=276, x=64, y=51
m=279, x=65, y=50
m=288, x=4, y=144
m=300, x=61, y=87
m=312, x=75, y=42
m=332, x=65, y=103
m=351, x=74, y=94
m=356, x=38, y=161
m=360, x=67, y=120
m=360, x=81, y=78
m=363, x=8, y=181
m=392, x=47, y=172
m=395, x=72, y=135
m=411, x=38, y=191
m=411, x=98, y=61
m=416, x=74, y=146
m=419, x=51, y=183
m=435, x=17, y=215
m=440, x=5, y=220
m=440, x=107, y=50
m=447, x=110, y=38
m=455, x=61, y=192
m=456, x=109, y=66
m=471, x=89, y=154
m=491, x=88, y=171
m=495, x=122, y=40
m=503, x=103, y=144
m=507, x=50, y=233
m=512, x=32, y=248
m=516, x=34, y=249
m=519, x=35, y=250
m=528, x=48, y=246
m=531, x=113, y=139
m=551, x=129, y=96
m=567, x=77, y=238
m=575, x=112, y=180
m=575, x=126, y=138
m=591, x=134, y=124
m=603, x=98, y=229
m=612, x=22, y=303
m=623, x=138, y=144
m=624, x=6, y=312
m=635, x=70, y=285
m=644, x=110, y=235
m=659, x=21, y=327
m=668, x=23, y=331
m=671, x=114, y=246
m=675, x=11, y=337
m=684, x=157, y=135
m=692, x=92, y=293
m=692, x=140, y=203
m=696, x=123, y=246
m=699, x=50, y=335
m=716, x=173, y=91
m=720, x=72, y=330
m=731, x=118, y=279
m=731, x=174, y=111
m=740, x=146, y=227
m=740, x=182, y=65
m=747, x=140, y=247
m=759, x=71, y=352
m=764, x=167, y=185
m=803, x=199, y=51
m=812, x=197, y=97
m=815, x=106, y=348
m=819, x=185, y=175
m=827, x=202, y=87
m=836, x=74, y=391
m=839, x=91, y=378
m=840, x=7, y=420
m=840, x=61, y=402
m=840, x=205, y=90
m=848, x=98, y=376
m=860, x=191, y=197
m=867, x=107, y=377
m=867, x=215, y=53
m=887, x=87, y=408
m=932, x=122, y=397
m=932, x=230, y=73
m=936, x=153, y=354
m=951, x=173, y=326
m=959, x=232, y=120
m=972, x=225, y=183
time = 26,942 ms.
?
существуют более одного решения.