All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
3 squares and 5 ways puzzle (Posted on 2015-05-19) Difficulty: 3 of 5
Find the minimum positive integer that is expressible as the sum of squares of three distinct positive integers in at least five different ways.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
206 =  1^2 + 3^2 + 14^2 
206 =  1^2 + 6^2 + 13^2 
206 =  2^2 + 9^2 + 11^2 
206 =  5^2 + 9^2 + 10^2 
206 =  6^2 + 7^2 + 11^2 

Subsequent occurrences of 5 or more ways (as soon as the count reaches 5 the reports start, so 7 ways, for example, first gets reported as 5 ways and 6 ways):

       206 5
       230 5
       266 5
       269 5
       314 5
       314 6
       326 5
       329 5
       329 6
       341 5
       341 6
       341 7
       350 5
       374 5
       374 6
       381 5
       389 5
       398 5
       413 5
       414 5
       425 5
       426 5
       426 6
       434 5
       434 6
       437 5
       441 5
       446 5
       446 6
       446 7
       446 8
       458 5
       458 6
       461 5
       461 6
       461 7
       470 5
       474 5
       486 5
       494 5
       494 6
       494 7
       497 5
       497 6
       506 5
       506 6
       506 7
       509 5
       509 6
       509 7
       521 5
       521 6
       521 7
       525 5
       530 5
       530 6
       542 5
       542 6
       545 5
       545 6
       545 7
       546 5
       546 6
       549 5
       549 6
       549 7
       554 5
       558 5
       558 6
       566 5
       566 6
       566 7
       569 5
       569 6
       569 7
       581 5
       581 6
       581 7
       585 5
       590 5
       593 5
       594 5
       594 6
       602 5
       602 6
       605 5
       605 6
       611 5
       614 5
       614 6
       614 7
       614 8
       621 5
       621 6
       621 7
       621 8
       626 5
       626 6
       626 7
       626 8
       629 5
       629 6
       629 7
       629 8
       630 5
       635 5
       638 5
       641 5
       641 6
       650 5
       650 6
       654 5
       654 6
       654 7
       659 5
       662 5
       665 5
       665 6
       666 5
       666 6
       666 7
       674 5
       677 5
       677 6
       677 7
       686 5
       686 6
       686 7
       686 8
       689 5
       689 6
       689 7
       689 8
       689 9
       693 5
       693 6
       698 5
       698 6
       701 5
       701 6
       701 7
       701 8
       705 5
       705 6
       706 5
       710 5
       710 6
       710 7
       710 8
       713 5
       713 6
       714 5
       714 6
       725 5
       725 6
       729 5
       731 5
       734 5
       734 6
       734 7
       734 8
       734 9
       734 10
       741 5
       741 6
       746 5
       746 6
       749 5
       749 6
       749 7
       749 8
       750 5
       750 6
       755 5
       755 6
       758 5
       761 5
       761 6
       761 7
       761 8
       761 9
       766 5
       766 6
       770 5
       770 6
       770 7
       770 8
       773 5
       773 6
       774 5
       774 6
       781 5
       782 5
       782 6
       789 5
       789 6
       789 7
       789 8
       794 5
       794 6
       794 7
       794 8
       794 9
       794 10
       797 5
       797 6
       797 7
       801 5
       801 6
       801 7
       806 5
       806 6
       806 7
       809 5
       809 6
       809 7
       810 5
       810 6
       810 7
       810 8
       818 5
       818 6
       819 5
       821 5
       821 6
       821 7
       824 5
       825 5
       825 6
       829 5
       830 5
       833 5
       833 6
       842 5
       842 6
       845 5
       845 6
       846 5
       846 6
       846 7
       846 8
       846 9
       846 10
       849 5
       849 6
       851 5
       854 5
       854 6
       854 7
       854 8
       854 9
       854 10
       854 11
       857 5
       857 6
       857 7
       861 5
       861 6
       866 5
       866 6
       866 7
       866 8
       866 9
       866 10
       869 5
       869 6
       869 7
       869 8
       874 5
       875 5
       875 6
       878 5
       881 5
       881 6
       881 7
       881 8
       881 9
       882 5
       882 6
       885 5
       885 6
       890 5
       893 5
       893 6
       893 7
       894 5
       894 6
       894 7
       899 5
       899 6
       899 7
       901 5
       902 5
       902 6
       905 5
       906 5
       906 6
       906 7
       909 5
       909 6
       909 7
       909 8
       909 9
       909 10
       914 5
       914 6
       914 7
       914 8
       917 5
       920 5
       923 5
       926 5
       926 6
       926 7
       926 8
       926 9
       926 10
       929 5
       929 6
       929 7
       929 8
       930 5
       930 6
       934 5
       934 6
       941 5
       941 6
       941 7
       941 8
       941 9
       941 10
       941 11
       945 5
       945 6
       945 7
       945 8
       950 5
       950 6
       950 7
       950 8
       950 9
       950 10
       953 5
       953 6
       953 7
       954 5
       954 6
       954 7
       962 5
       962 6
       965 5
       965 6
       965 7
       965 8
       965 9
       965 10
       966 5
       966 6
       971 5
       971 6
       971 7
       974 5
       974 6
       974 7
       974 8
       974 9
       978 5
       981 5
       981 6
       981 7
       985 5
       986 5
       986 6
       986 7
       986 8
       986 9
       986 10
       989 5
       989 6
       989 7
       989 8
       989 9
       990 5
       990 6
       990 7
       990 8
       990 9
       998 5
       998 6
      1001 5
      1001 6
      1001 7
      1001 8
      1001 9
      1001 10
      1006 5
      1010 5
      1010 6
      1011 5
      1013 5
      1013 6
      1014 5
      1014 6
      1014 7
      1019 5
      1019 6
      1021 5
      1022 5
      1022 6
      1022 7
      1022 8
      1025 5
      1025 6
      1025 7
      1025 8
      1026 5
      1026 6
      1029 5
      1029 6
      1029 7
      1029 8
      1034 5
      1034 6
      1034 7
      1034 8
      1034 9
      1034 10
      1034 11
      1035 5
      1041 5
      1041 6
      1041 7
      1041 8
      1046 5
      1046 6
      1046 7
      1046 8
      1046 9
      1046 10
      1049 5
      1049 6
      1049 7
      1049 8
      1049 9
      1049 10
      1050 5
      1050 6
      1050 7
      1053 5
      1053 6
      1053 7
      1053 8
      1058 5
      1058 6
      1061 5
      1061 6
      1062 5
      1062 6
      1064 5
      1067 5
      1069 5
      1069 6
      1069 7
      1070 5
      1070 6
      1070 7
      1070 8
      1070 9
      1073 5
      1074 5
      1074 6
      1074 7
      1076 5
      1077 5
      1077 6
      1082 5
      1085 5
      1085 6
      1085 7
      1085 8
      1086 5
      1086 6
      1086 7
      1089 5
      1089 6
      1091 5
      1091 6
      1091 7
      1091 8
      1094 5
      1094 6
      1097 5
      1097 6
      1097 7
      1097 8
      1098 5
      1098 6
      1098 7
      1101 5
      1101 6
      1101 7
      1102 5
      1106 5
      1106 6
      1106 7
      1106 8
      1106 9
      1106 10
      1106 11
      1106 12
      1109 5
      1109 6
      1109 7
      1109 8
      1109 9
      1109 10
      1109 11
      1109 12
      1114 5
      1115 5
      1118 5
      1118 6
      1118 7
      1118 8
      1118 9
      1121 5
      1121 6
      1121 7
      1121 8
      1121 9
      1121 10
      1125 5
      1125 6
      1125 7
      1125 8
      1126 5
      1130 5
      1130 6
      1130 7
      1130 8
      1130 9
      1130 10
      1133 5
      1133 6
      1133 7
      1134 5
      1134 6
      1134 7
      1134 8
      1134 9
      1139 5
      1139 6
      1139 7
      1141 5
      1141 6
      1145 5
      1146 5
      1146 6
      1146 7
      1146 8
      1150 5
      1154 5
      1154 6
      1154 7
      1154 8
      1154 9
      1154 10
      1154 11
      1154 12
      1154 13
      1157 5
      1157 6
      1158 5
      1161 5
      1161 6
      1161 7
      1161 8
      1161 9
      1161 10
      1166 5
      1166 6
      1166 7
      1166 8
      1166 9
      1169 5
      1169 6
      1169 7
      1169 8
      1169 9
      1169 10
      1169 11
      1169 12
      1173 5
      1173 6
      1174 5
      1174 6
      1174 7
      1179 5
      1179 6
      1181 5
      1181 6
      1181 7
      1181 8
      1181 9
      1181 10
      1181 11
      1182 5
      1186 5
      1190 5
      1190 6
      1190 7
      1190 8
      1190 9
      1190 10
      1193 5
      1193 6
      1193 7
      1193 8
      1194 5
      1194 6
      1194 7
      1197 5
      1202 5
      1205 5
      1205 6
      1205 7
      1205 8
      1205 9
      1206 5
      1206 6
      1206 7
      1206 8
      1206 9
      1209 5
      1209 6
      1209 7
      1209 8
      1209 9
      1209 10
      1210 5
      1211 5
      1211 6
      1211 7
      1214 5
      1214 6
      1214 7
      1214 8
      1214 9
      1214 10
      1217 5
      1217 6
      1217 7
      1218 5
      1218 6
      1221 5
      1221 6
      1221 7
      1221 8
      1225 5
      1226 5
      1226 6
      1226 7
      1226 8
      1226 9
      1226 10
      1229 5
      1229 6
      1229 7
      1229 8
      1229 9
      1230 5
      1230 6
      1234 5
      1235 5
      1235 6
      1238 5
      1238 6
      1238 7
      1238 8
      1238 9
      1238 10
      1241 5
      1241 6
      1242 5
      1242 6
      1242 7
      1242 8
      1245 5
      1245 6
      1245 7
      1245 8
      1249 5
      1249 6
      1249 7
      1250 5
      1250 6
      1250 7
      1250 8
      1251 5
      1251 6
      1253 5
      1253 6
      1253 7
      1253 8
      1256 5
      1256 6
      1259 5
      1259 6
      1259 7
      1262 5
      1262 6
      1262 7
      1262 8
      1262 9
      1265 5
      1265 6
      1265 7
      1265 8
      1265 9
      1265 10
      1266 5
      1266 6
      1266 7
      1269 5
      1269 6
      1269 7
      1269 8
      1270 5
      1274 5
      1274 6
      1274 7
      1274 8
      1274 9
      1274 10
      1277 5
      1277 6
      1277 7
      1277 8
      1278 5
      1281 5
      1281 6
      1283 5
      1286 5
      1286 6
      1286 7
      1286 8
      1286 9
      1286 10
      1286 11
      1286 12
      1286 13
      1286 14
      1289 5
      1289 6
      1289 7
      1289 8
      1293 5
      1293 6
      1294 5
      1294 6
      1294 7
      1298 5
      1298 6
      1298 7
      1301 5
      1301 6
      1301 7
      1301 8
      1301 9
      1301 10
      1301 11
      1301 12
      1304 5
      1305 5
      1305 6
      1305 7
      1305 8
      1305 9
      1307 5
      1309 5
      1309 6
      1310 5
      1310 6
      1310 7
      1310 8
      1310 9
      1313 5
      1314 5
      1314 6
      1314 7
      1314 8
      1314 9
      1314 10
      1316 5
      1316 6
      1317 5
      1321 5
      1322 5
      1322 6
      1322 7
      1322 8
      1322 9
      1322 10
      1325 5
      1325 6
      1325 7
      1325 8
      1325 9
      1326 5
      1326 6
      1326 7
      1326 8
      1326 9
      1326 10
      1329 5
      1329 6
      1329 7
      1329 8
      1330 5
      1330 6
      1331 5
      1333 5
      1334 5
      1334 6
      1334 7
      1334 8
      1337 5
      1337 6
      1338 5
      1341 5
      1341 6
      1341 7
      1341 8
      1341 9
      1341 10
      1342 5
      1346 5
      1346 6
      1349 5
      1349 6
      1349 7
      1349 8
      1349 9
      1349 10
      1349 11
      1349 12
      1349 13
      1349 14
      1350 5
      1350 6
      1350 7
      1350 8
      1350 9
      1354 5
      1355 5
      1355 6
      1358 5
      1358 6
      1361 5
      1361 6
      1361 7
      1361 8
      1361 9
      1361 10
      1361 11
      1361 12
      1361 13
      1361 14
      1362 5
      1364 5
      1364 6
      1364 7
      1370 5
      1370 6
      1370 7
      1370 8
      1370 9
      1370 10
      1371 5
      1374 5
      1374 6
      1374 7
      1377 5
      1377 6
      1379 5
      1379 6
      1379 7
      1379 8
      1381 5
      1381 6
      1382 5
      1382 6
      1382 7
      1382 8
      1382 9
      1385 5
      1385 6
      1385 7
      1385 8
      1385 9
      1385 10
      1385 11
      1386 5
      1386 6
      1386 7
      1386 8
      1386 9
      1386 10
      1389 5
      1389 6
      1389 7
      1390 5
      1394 5
      1394 6
      1394 7
      1394 8
      1394 9
      1394 10
      1395 5
      1395 6
      1397 5
      1397 6
      1400 5
      1401 5
      1401 6
      1403 5
      1403 6
      1403 7
      1405 5
      1406 5
      1406 6
      1406 7
      1406 8
      1406 9
      1406 10
      1406 11
      1409 5
      1409 6
      1409 7
      1409 8
      1410 5
      1410 6
      1410 7
      1410 8
      1413 5
      1413 6
      1413 7
      1414 5
      1414 6
      1414 7
      1418 5
      1418 6
      1418 7
      1418 8
      1421 5
      1421 6
      1421 7
      1421 8
      1421 9
      1421 10
      1421 11
      1421 12
      1421 13
      1422 5
      1422 6
      1425 5
      1425 6
      1426 5
      1426 6
      1426 7
      1426 8
      1427 5
      1427 6
      1427 7
      1429 5
      1430 5
      1430 6
      1430 7
      1430 8
      1433 5
      1433 6
      1433 7
      1433 8
      1434 5
      1434 6
      1434 7
      1434 8
      1437 5
      1437 6
      1441 5
      1441 6
      1442 5
      1442 6
      1445 5
      1445 6
      1445 7
      1445 8
      1446 5
      1446 6
      1446 7
      1449 5


DefDbl A-Z
Dim crlf$


Function mform$(x, t$)
  a$ = Format$(x, t$)
  If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
  mform$ = a$
End Function

Private Sub Form_Load()


 ChDir "v:\flooble"
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
 DoEvents
 
 Open "3squares5ways.txt" For Output As #2
 For a = 1 To 200
  For b = a + 1 To 200
    For c = b + 1 To 200
     t = a * a + b * b + c * c
     Print #2, mform(t, "#########0"); "   "; a; "  "; b; "  "; c
    Next
  Next
 Next
 Close 2
 
 Shell "sort < 3squares5ways.txt > 3sq5way.txt"
bypass:
 Open "3sq5way.txt" For Input As #1
 Do
   Line Input #1, l$
   prev$ = v$
   v$ = Left(l, 10)
   If v = prev Then ct = ct + 1 Else ct = 1
   If ct > 4 Then
     Text1.Text = Text1.Text & v & Str(ct) & crlf: DoEvents
     solct = solct + 1
   End If
 Loop Until EOF(1) Or solct > 1000
 Close 1
 Text1.Text = Text1.Text & crlf & crlf & "done"
 End Sub

Note: the Shell statement above did not actually work, as the remainder of the program was executed before the sort took place.  The sort was done manually and then a goto bypass was placed in the code to prevent the first part from running.

The breakdown of the 206 into 3 squares 5 ways was taken from the sorted file.

  Posted by Charlie on 2015-05-19 15:11:37
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (16)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information