Sum of all products

Algebra Level 1

Below is a multiplication table up to y × y . y \times y. Find y y such that the sum of all the products in the blue square equals 90000.


The answer is 24.

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.

22 solutions

Relevant wiki: Sum of n, n², or n³

I will provide a geometric representation of the times table:

In the image above, the area of each rectangle represents a product. The red squares are the perfect squares. Notice that in this grid we have a big square with side length measuring ( 1 + 2 + 3 + 4 + . . . + y ) (1+2+3+4+...+y) .

The sum of the area of all rectangles (including the squares) will be the sum of all products in the times table. In this problem the sum is 44488900 44488900 .

Hence, ( 1 + 2 + 3 + 4 + . . . + y ) 2 = 90000 ( 1 + 2 + 3 + 4 + . . . + y ) = 300 (1+2+3+4+...+y)^2=90000\Rightarrow\ (1+2+3+4+...+y)=300

Solving for y y :

1 + 2 + 3 + 4 + . . . + y = ( y + 1 ) y 2 = 300 \displaystyle{1+2+3+4+...+y=\frac{(y+1)y}{2}=300}

y 2 + y 600 = 0 \displaystyle{y^2+y-600=0}

y = 1 ± 1 2 4 1 ( 600 ) 2 1 = 1 ± 2401 2 = 1 ± 49 2 \displaystyle{y=\frac{-1 \pm \sqrt{1^2-4\cdot 1 \cdot (-600)}}{2\cdot1}=\frac{-1 \pm \sqrt{2401}}{2}=\frac{-1 \pm 49}{2}}

We only care for the positive solution for the equation which is y = 24 y=24

Then the answer for this problem is 24 \boxed{24} .

What is all this the correct answer is actually 24 Pls correct your answer

sayantan mondal - 3 years, 3 months ago

Log in to reply

Yeah, I think someone changed the numbers in the question. I've fixed the solution.

Pi Han Goh - 3 years, 3 months ago

if thats the right answer then why doesn't the formula (N * (N + 1) * (2N + 1)) / 6 working i.e., the sum of n² natural numbers

krishna shashank - 3 years, 3 months ago

Log in to reply

( 1 + 2 + 3 + + n ) 2 = 1 2 + 2 2 + 3 2 + + n 2 (1 + 2 + 3 + \cdots + n)^2 = 1^2 + 2^2 +3^2 + \cdots + n^2 is not always true.

Pi Han Goh - 3 years, 3 months ago

I don't think that would be useful, because we would only get the sum of the perfect squares, not the total sum..

karun mathews - 3 years, 3 months ago

The quadratic y^2 + y - 600 factors to (y-24)(y+25). Using the quadratic formula isn't necessary.

Soren Lantz - 3 years, 3 months ago

I arrived at y(y+1)=600 just like most solutions here.

Then, recognizing y and y +1 must be consecutive integers, I found it more fun to find the prime factorization of 600, then look for groups of factors that produce consecutive numbers. It was trivially easy:

600 = 2•2•2•3•5•5 = 24•25

So y=24

Sure, we can complete the square or use the quadratic formula—but where’s the fun in that?

A Former Brilliant Member - 3 years, 3 months ago

Where is the blue square?

Eivind Tjensvoll - 3 years, 3 months ago

Log in to reply

It's shown in the image. It contains y × y = y 2 = 2 4 2 = 576 y\times y = y^2 = 24^2 = 576 not necessarily distinct positive integers.

Pi Han Goh - 3 years, 3 months ago

I used this very same method .

Pankaj Jangra - 3 years, 3 months ago

I don’t understand how this problem works, what type of background do I need to understand this problem?

David Erlich - 3 years, 3 months ago

How do you conclude that 1+2+3+4+...+y =((y+1)y)/2 ???

Mat McCree - 3 years, 2 months ago
Arjen Vreugdenhil
Feb 11, 2018

Relevant wiki: Sum of n, n², or n³

90 000 = a = 1 y b = 1 y a b = ( a = 1 y a ) ( b = 1 y b ) = ( y ( y + 1 ) 2 ) 2 . 90\:000 = \sum_{a=1}^y \sum_{b=1}^y ab = \left( \sum_{a=1}^y a\right) \left( \sum_{b=1}^y b\right) = \left(\frac {y(y+1)} 2\right)^2. y ( y + 1 ) 2 = 300. \frac {y(y+1)} 2 = 300. "Completing the square" serves well here: y ( y + 1 ) = y 2 + y = ( y + 1 2 ) 2 1 4 y(y+1) = y^2 + y = (y + \tfrac12)^2 - \tfrac14 . ( y + 1 2 ) 2 = 600 1 4 = ( 24 1 2 ) 2 . (y+\tfrac12)^2 = 600\tfrac14 = (24\tfrac12)^2. y = 24 . y = \boxed{24}.

Arjen, you are correct

alex schroeder - 3 years, 4 months ago

it may confuse some to show 600+1/4 as 600 1/4. your method and answer are correct but instead of solving y(y+1)=600 by completing the square i preferred to find y by trying different integers to find y=24.

john keevil - 3 years, 3 months ago

Log in to reply

I just took the floor of sqrt(600), because it must lie between y and y+1

Mike Pannekoek - 3 years, 3 months ago

Log in to reply

That works... Only, to know for certain that this is actually a solution, you'll have to check that, after all, 24 x 25 = 600 indeed.

Arjen Vreugdenhil - 3 years, 3 months ago

Yeah That's what I did

Yash Ghaghada - 3 years, 3 months ago
Romain Bouchard
Feb 5, 2018

Relevant wiki: Sum of n, n², or n³

The sum of product in the first line is 1 + 2 + 3 + . . . + y = y ( y + 1 ) 2 1+2+3+...+y = \frac{y(y+1)}{2} The sum of product in the k k -th line is k + 2 k + 3 k + . . . + k y = k y ( y + 1 ) 2 k+2k+3k+...+ky = k\frac{y(y+1)}{2} The sum of product of all lines is k = 0 y k + 2 k + 3 k + . . . + k y = k = 0 y k y ( y + 1 ) 2 = ( y ( y + 1 ) 2 ) 2 ( y ( y + 1 ) 2 ) 2 = 90000 y 2 + y 2 90000 = 0 y = 1 + 1 + 8 90000 2 = 24 \sum_{k=0}^{y} k+2k+3k+...+ky = \sum_{k=0}^{y} k\frac{y(y+1)}{2} = (\frac{y(y+1)}{2})^2 \Rightarrow (\frac{y(y+1)}{2})^2 = 90000\Rightarrow y^2+y-2\sqrt{90000} = 0 \Rightarrow y =\frac{-1+\sqrt{1+8\sqrt{90000}}}{2} = 24

Wrong answer dude pls check it and correct it. It actually is 24

sayantan mondal - 3 years, 3 months ago

Log in to reply

Yeah, I think someone changed the numbers in the question. I've fixed the solution.

Pi Han Goh - 3 years, 3 months ago

Log in to reply

Yes, the number was changed by brilliant staff.

Ossama Ismail - 3 years, 3 months ago

Thats the identity i used. Great work

Jerry McKenzie - 3 years, 3 months ago

Let N = 1/2 n (n +1). Then we have N^2 = 90000 or since we know this is a positive, N = 300, or n (n + 1) = 600. Then a quick check shows 24 * 25 = 600 so 24 is the answer.

Craig Dupree - 3 years, 3 months ago

How do you get to the first equation of y(y+1)/2 ?

Richard Wüest - 3 years, 3 months ago

Log in to reply

sum of n, n², or n³ .

Ossama Ismail - 3 years, 3 months ago
Alex Schroeder
Feb 11, 2018

Notice how the different colors for the values inside the box always sum to the cube of their multiplier (on the outside of the blue box). That means that the sum of the values inside the blue box unto a certain value y can be represented as n = 1 y n 3 \sum_{n=1}^yn^3 . When that value is equal to 90,000, the y value is 24. Hence the answer: 24

Victor Dumbrava
Feb 6, 2018

You can write the sum of products in a really nice manner: S = ( 1 1 + 1 2 + + 1 y ) + ( 2 1 + 2 2 + + 2 y ) + + ( y 1 + y 2 + + y y ) S=(1\cdot 1+1\cdot 2+\cdots+1\cdot y)+(2\cdot 1+2\cdot 2+\cdots+2\cdot y)+\cdots+(y\cdot 1+y\cdot 2+\cdots+y\cdot y) Bringing the common factors to the front: S = 1 ( 1 + 2 + + y ) + 2 ( 1 + 2 + + y ) + + y ( 1 + 2 + + y ) S=1(1+2+\cdots+y)+2(1+2+\cdots+y)+\cdots+y(1+2+\cdots+y) S = ( 1 + 2 + + y ) ( 1 + 2 + + y ) = ( 1 + 2 + + y ) 2 = ( y ( y + 1 ) 2 ) 2 S=(1+2+\cdots+y)(1+2+\cdots+y)=(1+2+\cdots+y)^2=\left(\frac{y(y+1)}{2}\right)^2 But we know that S = 44488900 S=44488900 and that y y should be positive, so y ( y + 1 ) 2 = 90000 = 300 \frac{y(y+1)}{2}=\sqrt{90000}=300 . Therefore: 1 y 2 + 1 y 600 = 0 1y^2+1y-600=0 And all that we need to do it solve the quadratic equation and choose the positive value of y y : y 12 = 1 ± 1 + 4 600 2 = 1 ± 49 2 y_{12}=\frac{-1\pm\sqrt{1+4\cdot 600}}{2}=\frac{-1\pm 49}{2} Hence, y { 25 , 24 } y\in\{-25, 24\} , but y > 0 y>0 , so the intended solution is 24 .

Simply, each side is ( 1 + 2 + 3 + . . . + y ) (1+2+3+...+y) so that the area is ( 1 + 2 + 3 + . . . + y ) 2 (1+2+3+...+y)^2 . We set this area equal to 90000. Thus, ( 1 + 2 + 3 + . . . + y ) (1+2+3+...+y) is 90000 \sqrt{90000} = 300 300 . Then, ( y + 1 ) (y+1) y 2 \frac{y}{2} = 300 300 . We multiply the terms on the left side, multiply both sides by 2 2 , and subtract 600 600 from both sides to get y 2 y^2 + y y - 600 600 = 0 0 . Factoring, we get ( y + 25 ) (y+25) ( y 24 ) (y-24) and take the positive value 24 .

Lovlac Clav
Feb 15, 2018

(1+2+…+y) (1+2+…+y)=90000.
1+2+…+y=sqrt(90000)
1+2+…+y=300.
(1+y)


y/2=300
(1+y)*y=600
y+y^2=600
y=24 or -25


What about a programming solution!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
def main():
    n = 0
    i = 1
    while 1:
        n += i**2
        for j in range(i-1, 0, -1):
            n += 2*i*j
        if n == 90000:
            print('y equals to:', i)
            break
        i += 1

Which provides the answer: 24 \boxed{24}

Using math is much better to solve this problem.

Ossama Ismail - 3 years, 3 months ago

Log in to reply

Well, programming is math in a way, but yeah I agree with you. Just wanted to post something different, as long as everyone had already solved this mathematically.

Klearchos Thomopoulos - 3 years, 3 months ago

Log in to reply

I my self like programming .... hahaha

Ossama Ismail - 3 years, 3 months ago
Sundeep Narang
Feb 11, 2018

Each row or column is an AP

For x t h x^{th} row

a = x a = x , l = x y l= xy and n = y n=y where a is first term, l is last term, n is number of terms

so sum of x t h x{th} row is

y 2 ( x + x y ) \frac {y}{2} (x+xy)

= x y ( y + 1 ) 2 =\frac {xy(y+1)}{2}

and x x goes from 1 1 to y y

so total sum is

x = 1 y x y ( y + 1 ) 2 \sum_{x=1}^y \frac {xy(y+1)}{2}

= y ( y + 1 ) 2 x = 1 y x = \frac {y(y+1)}{2} \sum_{x=1}^y x

= y ( y + 1 ) 2 y ( y + 1 ) 2 = \frac {y(y+1)}{2} \frac {y(y+1)}{2}

= y 2 ( y + 1 ) 2 4 = \frac {y^2(y+1)^2}{4}

When sum is 90000

y 2 ( y + 1 ) 2 4 = 90000 \frac {y^2(y+1)^2}{4} = 90000 y ( y + 1 ) = 600 y(y+1) = 600

y = 24 \boxed{y=24 }

You have made this problem ludicrously complicated. Either that or something has been lost in the translation of you question. The sum of all the products in the blue square is:- 1+2+y+2+4+2y+y+2y+ysquared = 9 + 6y + ysquared 90000 = 9 + 6y + ysquared Thus y = 297 90000 = 9 + (6 x 297) + (297 x 297) 9 + 1782 + 88209 = 90000 QED Brush up on your English!!!

Tim Rolph - 3 years, 3 months ago

Log in to reply

You should be more kind. We’re all here to learn by trying our hand at novel problems. There are more ways than one to solve every problem, and novel approaches (even if cumbersome) can generate new insights.

Sundeep’s approach works wonderfully: the sum of rows, each containing n times the sum of consecutive integers. It seems clear enough to me, and though I do have an Ivy-league Phd, I’d like to believe that wasn’t a requirement to understand it.

A Former Brilliant Member - 3 years, 3 months ago
Sayantan Mondal
Feb 11, 2018

Nothing to worry just add up the vertical columns one by one and u will get the sum of first y natural numbers. Then add them all up , solve a small quadratic i.e. y^2+y-600=0 then gives u y as 24

Yousri Kenouna
Feb 17, 2018

First I tried 2 random numbers Which of course didn't work After that I decide to try solving it wich was very funny so thank you for posting it I used the Sequences (not sure about the name) And the sum was like ((1+y)y/2)^2 Then trying to solving the equation ((1+y)y/2)^2=90000 (1+y)y-600=0 And the result will be y=24

Lys Lol
Feb 17, 2018

Formula for sum of products in the square from number 1 to y is (n(n+1)/2)^2 e.g 1,9,36,100 So, 90000=(y(y+1)/2)^2 y(y+1)/2=300 y^2+y=600 y^2+y-600=0 (quadratic equation) Apply quadratic formula to solve for y. -(1)+sqrt 1^2-4(1)(-600)/2=24 Answer :24

Jacob Dalberg
Feb 15, 2018

I started out thinking 90000 is such a round number, so I thought maybe there is a pattern to the boxes as they get bigger. I started with 2x2 box which adds up to 9. 3x3 adds up to 36. 4x4 adds up to 100 !!!! Hang on this is a round number and they all happen to be squares. I did 6x6 which ends up being 441 which is 21^2. So the pattern of squares looks like.

1^2, 3^2, 6^2, 10^2, 15^2, 21^2... 1,3,6,10,15,21... are is the sequence of factorials 1!, 2!, 3!, 4!,5!, 6!...y!

thus (y!)^2=90000, y!=300 (square-root both sides)

(y/2)(y+1)=300 , y^2+y-600=0 (simplfied), (y-24)(y+25)=0

y equals 24 as -25 is not a possible blue box size.

Gaurang Mohta
Feb 15, 2018

Suppose £ means sigma Suppose we take 1 from the left column, we have to multiply it with every other number in the first row and add them. So it becomes 1(1+2+3+.......+y) = 1 £y Similarly taking 2 and multiplying it with every other number as adding, 2(1+2+3+....+y) =2 £y We have to do this for all numbers up till y. So end expression will be 1 £y + 2 £y + 3 £y +.......+y £y =£y(1+2+3+.......+y) =(£y)^2=90000 So £y=300 (y(y+1))/2=300 y(y+1)=600 Positive root is y=24

Bobby D
Feb 14, 2018

If you look at the pattern of 1^2, 2^2, 3^2, ... it turns out to be 1, 9, 36, 100. This pattern is (0+1)^2 = 1, (1+2)^2 = 9, (3+3)^2 = 36, (6+4)^2 = 100. The pattern is such that (x+y)^2 where x = the previous x+y, and y = the previous y +1. x follows this pattern: 0,1,3,6,10... and y follow this pattern: 1,2,3,4,5...

C++ solution
Int main()
{
Int a=1;
Int b=1;
Int c=1;
Int d=1;
Int w=0;
Int x=0;
Int z=0;
Int y;
Cin>>y;
While (b<y) { x=a+x;
a=a+1; b=b+1;}
While (c<y) { w=x*d; z=w+z;
d=d+1; c=c+1; }
Cout<<“num “<<z;
Return 0;
}
Then you insert 1 number higher than the number you are looking for, on this case, you insert 25 and here is your result, 24! You can do this with any number :)











Johan Potums
Feb 14, 2018

I just thought about it and ran a bit of code. My math reasoning is lacking :-)

1
2
3
4
5
6
7
var sum = 0;
var up = 24;
for (var i = 1; i <= up; i++){
  for (var j = 1; j <= up; j++){
    sum = sum + (i*j);
  }
}

the online tool i used just printed sum in the end - hence no statement

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
match = 90000
import numpy as np
i = 1
while i > 0:
    indices = np.indices((i, i))
    a = (indices[0]+1) * (indices[1]+1) 
    if np.sum(a) == match:
        print i
        break
    i += 1
print a

1
2
3
4
5
6
7
8
24
[[  1   2   3 ...,  22  23  24]
 [  2   4   6 ...,  44  46  48]
 [  3   6   9 ...,  66  69  72]
 ..., 
 [ 22  44  66 ..., 484 506 528]
 [ 23  46  69 ..., 506 529 552]
 [ 24  48  72 ..., 528 552 576]]

Markus Pfaff
Feb 12, 2018

Lazy person's brute force method.

Using this handsome lil' snippet of code I can easily make a multiplication table of any given size, and calculate the sum all of the numbers in it:

1
2
3
4
5
6
7
import numpy as np
y = 10
x = range(1,y+1)
table = np.array([[i*j for j in x] for i in x])
tableSum = table.sum()
print(table)
print('y = ', y, '\ttableSum =', tableSum)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[[  1   2   3   4   5   6   7   8   9  10]
 [  2   4   6   8  10  12  14  16  18  20]
 [  3   6   9  12  15  18  21  24  27  30]
 [  4   8  12  16  20  24  28  32  36  40]
 [  5  10  15  20  25  30  35  40  45  50]
 [  6  12  18  24  30  36  42  48  54  60]
 [  7  14  21  28  35  42  49  56  63  70]
 [  8  16  24  32  40  48  56  64  72  80]
 [  9  18  27  36  45  54  63  72  81  90]
 [ 10  20  30  40  50  60  70  80  90 100]]
y =  10     tableSum = 3025 

So, all I need to do is turn my code into a loop that iterates through increasing values of y until I encounter a tableSum that's equal to (or bigger than) 90 000.

Oh, and since the table sum is the only important part, I'm not gonna keep showing the whole table every iteration. Okay, here's the loop version:

1
2
3
4
5
6
7
while tableSum < 90000:
    y += 1
    x = range(1,y+1)
    table = np.array([[i*j for j in x] for i in x])
    tableSum = table.sum()
    print('y = ', y, '\ttableSum =', tableSum)
print('The answer is: y =', y)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
y =  11     tableSum = 4356
y =  12     tableSum = 6084
y =  13     tableSum = 8281
y =  14     tableSum = 11025
y =  15     tableSum = 14400
y =  16     tableSum = 18496
y =  17     tableSum = 23409
y =  18     tableSum = 29241
y =  19     tableSum = 36100
y =  20     tableSum = 44100
y =  21     tableSum = 53361
y =  22     tableSum = 64009
y =  23     tableSum = 76176
y =  24     tableSum = 90000
The answer is: y = 24

Q . E . D . Q.E.D.

Dan Hicks
Feb 12, 2018

Sum of y terms squared. Rearrange into a quadratic equation and then solve.

Eduardo Ag_182
Feb 11, 2018

It's not elegant, but it works for me

Giorgos K.
Feb 11, 2018

Accumulate@Range[30]^2
this Mathematica code gives us the first 30 sums

{1,9,36,100,225,441,784,1296,2025,3025,4356,6084,8281,11025,14400,18496,23409,29241,36100,44100,53361,64009,76176,**90000**,105625,123201,142884,164836,189225,216225}

90000 is 24th on this list

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...