Find the sum of all mutiples of 7 lying between 500-900 in arithmetic progression 0
Answers
Answered by
0
I made the assumption of 500 - 900 INCLUSIVE
My PYTHON program:
sum = 0
for x in range (500, 901):
if x % 7 != 0:
sum += x
print()
print ('Sum = {:,}'.format(sum))
Sum = 240,800
Answered by
0
900/7 = 128.57
l = 7 x 128 = 896
500/7 = 71.43
a = 72 x 7 = 504
896 = 504 + (n - 1)7
896 - 504 = 7n - 7
392 + 7 = 7n
n = 399 /7 = 57
Sum = n/2 (a + l ) or you can use n/2 [2a + (n-1)d]
57/2 ( 504 + 896) 57/2 [2x 504 + (57 -1) 7}
57/2 x 1400 57/2 x (1008 + 392)
57 x 700 = 39900 57/2 x 1400 = 57 x 700 = 39900
Answer is 39900
Similar questions