The first odd number after 1 which is divisible by 3 is 3, the next odd number divisible by 3 is 9 and the last odd number before 1000 is 999.
So, all these terms will form an A.P. 3, 9, 15, 21 … with the common difference of 6
So here
First term (a) = 3
Last term (l) = 999
Common difference (d) = 6
So, here the first step is to find the total number of terms. Let us take the number of terms as n.
Now, as we know,
an=a+(n-1)d
So for the last term,
999 = 3 + (n -1)6
999 = 3 + 6n - 6
999 = 6n - 3
999 + 3 = 6n
Further simplifying
1002 = 6n
n = 1002/6
n = 167
Now, using the formula for the sum of n terms,
On further simplification we get
Sn=167(501)
= 83667
Therefore the sum of all the odd numbers lying between 1 and 1000 is Sn=83667