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

 Adjacent Square Sum II (Posted on 2013-06-10)
In the six rows of numbers below, each of the pairs adds up to 25. Now 25 happens to be a perfect square.

Fill in the blanks with a third number (a different number in each row) so that the sums of any two numbers on any row is a perfect square.
```+---+---+---+
| 1 |24 |   |
+---+---+---+
| 2 |23 |   |
+---+---+---+
| 3 |22 |   |
+---+---+---+
| 4 |21 |   |
+---+---+---+
| 5 |20 |   |
+---+---+---+
| 6 |19 |   |
+---+---+---+```

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 No Subject | Comment 2 of 5 |
`DEFDBL A-ZCLSFOR n1 = 1 TO 10n2 = 25 - n1FOR n3 = 1 TO 999999IF n3 <> n1 AND n3 <> n2 THENs2 = n1 + n3: sr = INT(SQR(s2) + .5)IF sr * sr = s2 THENs3 = n2 + n3: sr = INT(SQR(s3) + .5)IF sr * sr = s3 THENPRINT n1; n2; n3, s2; s3EXIT FOREND IFEND IFEND IFNEXTNEXTfindsarray      the 2 added squares1 24 120    121 1442 23 98     100 1213 22 78     81 1004 21 60     64 815 20 44     49 646 19 30     36 49`
`Also it can be extended two more rows:1 24 120    121 1442 23 2      4 253 22 78     81 1004 21 60     64 815 20 44     49 646 19 30     36 497 18 18     25 368 17 8      16 25`

by not requiring uniqueness of numbers within a row. I think that was a misunderstanding on my part that added that requirement.

Edited on June 10, 2013, 2:29 pm
 Posted by Charlie on 2013-06-10 13:37:54

 Search: Search body:
Forums (0)