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

Home > Just Math
Square triplets (Posted on 2017-11-05) Difficulty: 3 of 5
Let S=(a,b,c,d) be a set of 4 distinct integers, such that each of its 4 subsets of 3 integers has as a sum of the members a square number.

Find all possible sets with each of the integers not exceeding 300.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2
a  b  c  d    total     total minus
                       a  b   c   d
1 22 41 58    122    121 100 81 64
9 34 57 78    178    169 144 121 100
7 34 59 103    203    196 169 144 100
14 41 66 89    210    196 169 144 121
5 34 61 130    230    225 196 169 100
12 41 68 116    237    225 196 169 121
1 32 88 136    257    256 225 169 121
3 34 63 159    259    256 225 196 100
10 41 70 145    266    256 225 196 121
26 57 86 113    282    256 225 196 169
1 34 65 190    290    289 256 225 100
4 68 97 124    293    289 225 196 169
6 39 99 151    295    289 256 196 144
8 41 72 176    297    289 256 225 121
24 57 88 144    313    289 256 225 169
33 66 97 126    322    289 256 225 196
2 37 130 157    326    324 289 196 169
6 41 74 209    330    324 289 256 121
22 57 90 177    346    324 289 256 169
31 66 99 159    355    324 289 256 196
4 41 76 244    365    361 324 289 121
9 46 114 201    370    361 324 256 169
16 88 121 152    377    361 289 256 225
18 55 123 183    379    361 324 256 196
20 57 92 212    381    361 324 289 169
29 66 101 194    390    361 324 289 196
2 41 78 281    402    400 361 324 121
3 79 114 207    403    400 324 289 196
49 86 121 154    410    361 324 289 256
14 53 158 189    414    400 361 256 225
18 57 94 249    418    400 361 324 169
23 99 134 167    423    400 324 289 256
25 64 136 200    425    400 361 289 225
27 66 103 231    427    400 361 324 196
1 42 153 246    442    441 400 289 196
47 86 123 191    447    400 361 324 256
8 88 160 193    449    441 361 289 256
16 57 96 288    457    441 400 361 169
58 97 134 169    458    400 361 324 289
21 62 173 206    462    441 400 289 256
25 66 105 270    466    441 400 361 196
2 125 162 197    486    484 361 324 289
45 86 125 230    486    441 400 361 256
4 88 164 232    488    484 400 324 256
6 49 201 234    490    484 441 289 256
6 90 129 265    490    484 400 361 225
10 53 133 298    494    484 441 361 196
56 97 136 208    497    441 400 361 289
15 99 175 210    499    484 400 324 289
30 73 153 258    514    484 441 361 256
39 123 162 199    523    484 400 361 324
41 84 164 236    525    484 441 361 289
43 86 127 271    527    484 441 400 256
2 47 207 275    531    529 484 324 256
9 138 177 214    538    529 400 361 324
54 97 138 249    538    484 441 400 289
11 99 179 251    540    529 441 361 289
13 58 218 253    542    529 484 324 289
13 101 142 286    542    529 441 400 256
24 112 153 264    553    529 441 400 289
78 121 162 201    562    484 441 400 361
37 82 205 242    566    529 484 361 324
48 136 177 216    577    529 441 400 361
50 95 179 255    579    529 484 400 324
52 97 140 292    581    529 484 441 289
7 99 183 294    583    576 484 400 289
9 56 224 296    585    576 529 361 289
76 121 164 244    605    529 484 441 361
31 123 207 246    607    576 484 400 361
89 134 177 218    618    529 484 441 400
46 93 222 261    622    576 529 400 361
12 153 196 276    637    625 484 441 361
25 166 209 250    650    625 484 441 400
74 121 166 289    650    576 529 484 361
27 123 211 291    652    625 529 441 361
29 78 254 293    654    625 576 400 361
87 134 179 263    663    576 529 484 400
40 136 224 265    665    625 529 441 400
6 153 241 282    682    676 529 441 400
68 164 209 252    693    625 529 484 441
70 119 211 295    695    625 576 484 400
34 181 226 269    710    676 529 484 441
113 162 209 254    738    625 576 529 484
79 179 226 271    755    676 576 529 484
126 177 226 273    802    676 625 576 529



Of course permutations of the above sets also work, but only ascending order is shown.


DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For tot = 1 To 1200
    For a = 1 To tot / 4
    For b = a + 1 To (tot - a) / 3
    For c = b + 1 To (tot - a - b - 1) / 2
      d = tot - a - b - c
      If d < 300 Then
        sq = tot - a
        sr = Int(Sqr(sq) + 0.5)
        If sr * sr = sq Then
        sq = tot - b
        sr = Int(Sqr(sq) + 0.5)
        If sr * sr = sq Then
        sq = tot - c
        sr = Int(Sqr(sq) + 0.5)
        If sr * sr = sq Then
        sq = tot - d
        sr = Int(Sqr(sq) + 0.5)
        If sr * sr = sq Then
           Text1.Text = Text1.Text & a & Str(b) & Str(c) & Str(d)
           Text1.Text = Text1.Text & "    " & tot & "    "
           Text1.Text = Text1.Text & tot - a & Str(tot - b) & Str(tot - c) & Str(tot - d)
           Text1.Text = Text1.Text & crlf
        End If
        End If
        End If
        End If
      End If
      DoEvents
    Next
    Next
    Next
 Next
 
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub


  Posted by Charlie on 2017-11-05 14:14:00
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (20)
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