## Pile Of Oranges

#### Problem

A pile of oranges are arranged to make a square based pyramid by having one orange on the top layer, four oranges on the second layer, nine oranges on the third layer, and so on. Such that consecutive layers will have a number of oranges equal to consecutive square numbers: 1, 4, 9, 16, 25, ...

If there were one-thousand oranges in the pile used to make the pyramid not all of them would be needed. How many oranges would be left over?

#### Solution

1^{2} + 2^{2} + 3^{2} + … + 13^{2} = 819 and 1000 819 = 181 (14^{2} = 196)

So there will be 181 oranges left over.

Can you find a better way to add together square numbers?

What if there was one million oranges to build a pyramid from?

Problem ID: 34 (Feb 2001) Difficulty: 1 Star