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

Home > Numbers
8 distinct partitions (Posted on 2018-12-06) Difficulty: 3 of 5
This number N can be expressed as the sum of 1, 2, 3, 4, 5, 6, 7, 8 distinct squares.

Find N and show the 8 possible partitions.

Rem: This fact was discovered by Crespi de Valldaura.

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 2 of 6 |
289 is the lowest such number. In each set below, the terms making up the eight ways are shown below the number.

289
 289
 64 225
 64 81 144
 4 16 100 169
 4 9 16 64 196
 1 4 9 25 81 169
 1 9 16 25 36 81 121
 1 4 9 16 25 49 64 121

625
 625
 49 576
 81 144 400
 4 9 36 576
 1 4 36 100 484
 1 4 9 25 225 361
 1 4 9 16 81 225 289
 1 4 9 16 25 49 121 400

676
 676
 100 576
 36 64 576
 1 9 225 441
 1 9 16 25 625
 1 4 9 25 196 441
 1 4 9 16 36 81 529
 1 4 9 16 25 36 144 441

841
 841
 400 441
 9 256 576
 1 64 100 676
 1 4 16 36 784
 1 4 9 25 361 441
 1 4 9 16 81 289 441
 1 4 9 16 25 169 256 361

900
 900
 324 576
 16 100 784
 1 9 49 841
 1 9 25 81 784
 1 4 9 36 121 729
 1 4 9 16 25 169 676
 1 4 9 16 25 100 169 576

1156
 1156
 256 900
 256 324 576
 1 25 169 961
 1 9 16 169 961
 1 4 9 25 441 676
 1 4 9 16 36 361 729
 1 4 9 16 25 64 196 841

1225
 1225
 441 784
 1 324 900
 1 4 64 1156
 1 4 36 400 784
 1 4 9 25 225 961
 1 4 9 16 25 81 1089
 1 4 9 16 25 256 289 625

1369
 1369
 144 1225
 9 64 1296
 1 16 196 1156
 1 4 16 324 1024
 1 4 9 49 81 1225
 1 4 9 16 25 225 1089
 1 4 9 16 25 64 289 961

1521
 1521
 225 1296
 4 361 1156
 4 9 64 1444
 1 4 36 324 1156
 1 4 9 225 441 841
 1 4 9 16 25 625 841
 1 4 9 16 25 49 121 1296

1681
 1681
 81 1600
 16 144 1521
 1 16 64 1600
 1 4 36 196 1444
 1 4 9 25 121 1521
 1 4 9 16 49 81 1521
 1 4 9 16 25 256 529 841

2025
 2025
 729 1296
 16 784 1225
 1 4 256 1764
 1 4 324 400 1296
 1 4 9 49 441 1521
 1 4 9 16 25 121 1849
 1 4 9 16 25 49 400 1521

2500
 2500
 196 2304
 324 576 1600
 1 25 625 1849
 1 9 16 625 1849
 1 4 9 36 49 2401
 1 4 9 16 36 225 2209
 1 4 9 16 25 64 1156 1225

DefDbl A-Z
Dim crlf$, sq, amt(8, 8), solCt, remain, termCt, sol(8), series(8)


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 
 For sr = 5 To 50
   sq = sr * sr
   For i = 1 To 8
     sol(i) = 0
   Next
   
   remain = sq: solCt = 0
   test
   
   If solCt = 8 Then
     Text1.Text = Text1.Text & sq & crlf
     For i = 1 To 8
       For j = 1 To i
         Text1.Text = Text1.Text & Str(amt(i, j))
       Next
       Text1.Text = Text1.Text & crlf
     Next
     Text1.Text = Text1.Text & crlf
     DoEvents
   End If
 Next
 
 
 Text1.Text = Text1.Text & " done"
  
End Sub

Sub test()
  DoEvents
  For trsr = Int(Sqr(series(termCt)) + 0.5) + 1 To Sqr(remain)
    DoEvents
    remain = remain - trsr * trsr
    termCt = termCt + 1
    series(termCt) = trsr * trsr
    If remain > 0 Then
      If termCt < 8 Then
        test
      End If
    ElseIf remain = 0 Then
      If sol(termCt) = 0 Then
        sol(termCt) = 1
        solCt = solCt + 1
        For i = 1 To termCt
          amt(termCt, i) = series(i)
        Next
      End If
    Else
      Exit For
    End If
    termCt = termCt - 1
    remain = remain + trsr * trsr
  Next
  
End Sub


  Posted by Charlie on 2018-12-06 22:40:19
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 (0)
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