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$? 

Hint: 
You can model the task as
$$
S(N) = \sum_{k=1}^N (2 k - 1) = 1 000 000
$$
Your task is to determine the last term $2N-1$.
One way is trial and error (writing a small computer program) or to find a closed solution for the sum, which will feature $N$. 
$$
S(N) = 1 000 000
$$
Then solve for $N$ and calculate the last term $2N-1$ from it.
Hint:
You can use the linearity of the summation to transform the sum:
$$
S(N) = \sum_{k=1}^N (2 k - 1) 
= 2 \left(\sum_{k=1}^N k \right) - \left( \sum_{k=1}^N 1 \right) 
= 2 \left( \sum_{k=1}^N k \right) - N
$$
So this is now reduced to finding the sum of the first $N$ integers.
Can you take it from here?
