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

Home > Just Math
2 equal sums (Posted on 2016-04-11) Difficulty: 3 of 5
What is the largest n for which
1^2+2^2+3^2+ ... +n^2 = 1+2+3+ ... +m has a solution
with integer values of n & m?.

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 exploration -- possible spoiler | Comment 1 of 3
The sum of the first m integers is

m(m+1)/2



DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 sqs = 0
 For n = 1 To 9999999
   sqs = sqs + n * n
   mp = Sqr(sqs * 2)
   m = Int(mp)
   If m * (m + 1) / 2 = sqs Then
      Text1.Text = Text1.Text & n & Str(m) & "    " & Str(sqs) & crlf
   End If
  
 Next

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

Sums the first n squares and attempts to find an m that will work.

The results are

n m    sums
1 1     1
5 10     55
6 13     91
85 645     208335
2696556 3615502423     6.53592888716719E+18
4432596 7619766609     2.90304215916256E+19
4767069 8498290955     3.61104745821666E+19
6506645 13551584866     9.18227261969759E+19
8888711 21637774295     2.340966382315E+20
9936291 25573540422     3.27002984870621E+20

In the cases above n=85, m=645, the results are probably spurious, as the sum of the squares exceeds the precision available with double-precision floating point.

This points to 85 being the largest n for which this is possible.

  Posted by Charlie on 2016-04-11 15:49:43
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