Math, asked by chitrakala261985, 7 months ago

find the sum of all natural numbers between 500and 700 which are not divisible by 5​

Answers

Answered by Anonymous
0

Answer:

The sum can be obtained by finding the difference between the sums of the two arithmetic series :

S1 = 501 + 502 + ….+ 899 {sum of all integers between 500 & 900}.

S2 = 504 + 511 + … + 896 {sum of integers between 500 & 900 which are divisible by 7}.

The formula for each sum is given by:

s(n) = n/2*[2*a + (n-1)*d], where n is the number of terms, a is the 1st term, and d is the common difference.

Therefore,

S1 = 399/2*[1002 + (399 - 1) *1] = 399*1400/2 = 279300

S2 = 57/2 *[1008 + (57–1)*7] = 57*1400/2 = 39900

Therefore,

The answer: S1 - S2 = 279300 - 39900 = 239400.

A short Python (2.7) solution:

print "Find the sum of all numbers between 500 & 900 not divisible by 7."

sumall = 0 # Start with a sum of 0.

for num in range(501,900): # Check all numbers in the range.

if num % 7 <> 0: # If a number is not divisible by 7,

sumall += num # Add the number to the running sum.

print""

print "The sum is :",sumall # Print the final sum.

The progam output:

Find the sum of all numbers between 500 & 900 not divisible by 7.

The sum is : 239400

>>>

Good luck!

Answered by cy78438mailcom
0

Answer:

Please mark as Brainliest......

Attachments:
Similar questions