Balls are arranged in rows to form an equilateral triangle. The first row consists of one ball, the second of two balls, the third of 3 balls and so on. If 456 more balls are added then all the balls can be arranged in the shape of a square and each of its sides then contains 8 balls less than the balls in each side of the triangle. Determine the initial number of balls.
Let number of balls in a side of the triangle are n
Thus total number of balls are
x = 1 + 2 + 3 +........+(n-2) + (n-1) + n (1)
or
x = n + (n-1) + (n-2) +.......+ 3 + 2 + 1 (2)
adding (1) and (2)
2x =(n+1) +(n+1) + (n+1)+.......+(n+1) +(n+1)+(n+1)
or 2x = n.(n+1)
or x =n(n+1)/2
According to given condition n(n+1)/2 + 456 = (n-8)2
On solving or checking the options we get n = 49
Thus x = 49*50/2 = 1225