If I am not totally mistaken you could calculate that without the loop entirely.

3 * (n+1) * (41 * n + 304) and the result divided by 200 where n is the upper limit for the loop.

Plus I'm not sure wether you even need those values or simply used the equotation for testing. :X

I'm quite tired so sorry if I'm offtopic.

I made some testing: I am mistaken. You need to use n-1.

For n = 10 i get 100.94 period9 and with my equotation for n=9 i get 100.95

With ( 3*n*(41*n+263) ) /200 i get 100.95 for n = 10.

It also checks for other values, so i guess Its fine now. X)

### Show differencesHistory of post edits

### #2KuroSei

Posted 07 June 2013 - 06:51 PM

If I am not totally mistaken you could calculate that without the loop entirely.

3 * (n+1) * (41 * n + 304) and the result divided by 200 where n is the upper limit for the loop.

Plus I'm not sure wether you even need those values or simply used the equotation for testing. :X

I'm quite tired so sorry if I'm offtopic.

I made some testing: I am mistaken. You need to use n-1.

For n = 10 i get 100.94 period9 and with my equotation for n=9 i get 100.95

With ( 3*n*(41*n+263) ) /200 i get 100.95 for n = 10.

It also checks for other values, so i guess Its fine now. X)

3 * (n+1) * (41 * n + 304) and the result divided by 200 where n is the upper limit for the loop.

Plus I'm not sure wether you even need those values or simply used the equotation for testing. :X

I'm quite tired so sorry if I'm offtopic.

I made some testing: I am mistaken. You need to use n-1.

For n = 10 i get 100.94 period9 and with my equotation for n=9 i get 100.95

With ( 3*n*(41*n+263) ) /200 i get 100.95 for n = 10.

It also checks for other values, so i guess Its fine now. X)

### #1KuroSei

Posted 07 June 2013 - 06:41 PM

If I am not totally mistaken you could calculate that without the loop entirely.

3 * (n+1) * (41 * n + 304) and the result divided by 200 where n is the upper limit for the loop.

Plus I'm not sure wether you even need those values or simply used the equotation for testing. :X

I'm quite tired so sorry if I'm offtopic.