You can notice that :
if , then
So the problem is equivalent to finding k such as :
You can find k by the calculus, but i can give you an approximation :
if k=1413, k(k+1)/2=998991 and (k+1)(k+2)/2=1000405
So k=1413 is solution.
Err...actually, i don't know why you are told a is geometric series though the series they gave you is kinda arithmetical oO
Perhaps i made a mistake, so if it seems wrong to you, don't hesitate to tell me :s