BTW, if you want a fast formula for calculating the sum of "n+(n-1)+(n-2)+...+2+1", it's n*(n+1)/2.
The idea is that you're finding the sum of "n" terms of an arithmetic progression; the generic formula is:
Sum=(n/2)*(A+L)
Where:
A is the first term in the series
L is the Last term in the series
n is the number of terms
[ March 21, 2003, 16:25: Message edited by: DirectorTsaarx ]