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

Home > Numbers
Sum of 4 squares (Posted on 2018-07-08) Difficulty: 3 of 5
The number N is a sum of 4 different numbers, each being a square of one of the 4 smallest divisors of N (e.g. N=36 does not qualify since 1^2+2^2+3^2+4^2
sums up to 30, not 36.)

Provide a full list of similar numbers or show that none exist.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer finding (no proof of completeness) | Comment 1 of 4
DefDbl A-Z
Dim crlf$, dvr(4)


Private Sub Form_Load()
 Form1.Visible = True
 Text1.Text = ""
 crlf = Chr(13) + Chr(10)
 
 For n = 4 To 10000
    dct = 0
    sr = Sqr(n)
    For i = 1 To n
     q = n / i
     If q = Int(q) Then
       dct = dct + 1
       dvr(dct) = i
       If dct = 4 Then Exit For
     End If
     If dct = 1 And i > sr Then Exit For
     DoEvents
    Next
    If dct < 4 And dct > 1 Then
     If dvr(dct) < n Then
       dct = dct + 1: dvr(dct) = n / dvr(dct - 2)
       If dvr(dct) < n And dct < 4 Then
         dct = dct + 1: dvr(dct) = n / dvr(dct - 4)
       End If
     End If
    End If
    DoEvents
    If dct = 4 Then

            If dvr(1) * dvr(1) + dvr(2) * dvr(2) + dvr(3) * dvr(3) + dvr(4) * dvr(4) = n Then
              Text1.Text = Text1.Text & n & "      " & dvr(1) * dvr(1) & "  " & dvr(2) * dvr(2) & "  " & dvr(3) * dvr(3) & "  " & dvr(4) * dvr(4)
              Text1.Text = Text1.Text & crlf
            End If

    End If
 
  Next

 
 Text1.Text = Text1.Text & crlf & tot & " done"
  
End Sub


finds only


130   =   1 + 4 + 25 + 100

  Posted by Charlie on 2018-07-08 15:55:49
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 (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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