Find the smallest integer a > 1 such that: i = 1 ∑ a i 2 = N 2 where N is an integer.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
My solution. Use the fact that the sum of consecutive squares from 1 to n is 6 n ( n + 1 ) ( 2 n + 1 ) . Now this must be a square, x 2 . Rewrite it as n ( n + 1 ) ( 2 n + 1 ) = 6 x 2 Now multiplying the two parenthesis we obtain n ( 2 n 2 + 3 n + 1 ) = 6 x 2 . The g c d ( n , 2 n 2 + 3 n + 1 ) = 1 so let's say that 6 ∣ n ⟹ n = 6 k . By substitution in the original equation we obtain k ( 6 k + 1 ) ( 1 2 k + 1 ) = x 2 now all three terms must be perfect squares because they are all coprimes (proved easily thanks to Euclidean algorithm). The smallest value that makes this true is k = 4 ⟹ n = 6 × 4 = 2 4 so the smalles solution is n = 2 4 and thus x = 7 0 .
Python 3.5.1:
def issquare(n):
if n**0.5==round(n**0.5):
return True
count=2
while not issquare(sum(i**2 for i in range(1,count+1))):
count+=1
print (count)
Is there any approach to this question using pure number theory? Please comment.!
I am not totally sure. This was a problem posed to me that I solved by guess and check. I was wondering if there was a better solution, so I posted it on Brilliant.
My solution: Sum of squares is:
6 n ( n + 1 ) ( 2 n + 1 )
Now for a big assumption: two of the three terms in the multiplication in the numerator are perfect squares, the other is 6 times a perfect square. This is a big assumption, and in no way justified, although it limits the possible values of n and it is an intuitive leap of logic: if these conditions are satisfied, then the sum will be a perfect square. Checking n = 6 , n + 1 = 6 , o r 2 n + 1 = 6 , none works (it is checked easily as 5 and 7 are not perfect squares, and if 2 n + 1 = 6 then n is not an integer). Now we jump to 24. Note that 2 4 + 1 is a perfect square, so it is natural to assign n = 2 4 . Checking this condition we see it works.
My logic is mostly guess work, and in no way a good solution to the problem.
It is possible this problem should be a computer science problem.
Log in to reply
Ok I got it , why don't you repost it, maybe the seniors will view & solve it this time (if possible) , Btw nice question & nice logic ! I also did it by hit nd trial !
Look at my solution.
Problem Loading...
Note Loading...
Set Loading...
This is the Cannonball problem . The only solutions ( a , N ) are (1,1) and (24,70).