Money Word Problem I could not seem to be able to solve this money word problem!

Mathew has received 1 dollar the first week, 3 dollars the 2nd week, 5
  dollars the 3rd week and so on until he has received a total of 1 000
  000 dollars. What amount did he receive the last week?

EDIT
I went onto the detailed solutions page and it had said the following...

Mathew has received 1 + 3 + 5  + ... = 1 000 000. We know that $n^2$ = 1 000 000 and that $n$ = 1 000. He has received a certain amount (1, 3, 5, ...) every week for 1 000 weeks. The amount x received on the 1 000 the week is given by the equation: (1 + x) ÷ 2 = 1 000. This equation becomes 1 + x = 2 000. We find that 
  x = 1 999. The last week, Mathew received $1 999

Could someone please explain to me why $n^2 = 1000000$? 

The reason behind this is that $2n+1=Money$ (True as week 1 is 3 dollars, 2 is 5 dollars, etc.) yields every odd number! And it is $n^2$ because to find the total value of the first $n$ odd numbers you must square it. So we can conclude that $n^2=1000000$ and $n=1000$. To reiterate, the value of the first $n$ odd numbers is 1 million, so we get the square and we have the answer! (See https://artofproblemsolving.com/wiki/index.php?title=Proofs_without_words to understand more)
