Proceeding as in Q, we have
S=S3+S7−S21
S3= sum of all those number between 200 and 500 which are divisible by 3
=201+204+..+498
498=201+(n−1)3 by l=a+(n−1)d
∴n=100
∴S3=1002[201+498]=50×699=34950
S7=203+210+....+497
497=203+(n−1)7 or 2947=n=1 ⇒n=43
S7=432[201+497]=15050
S21=210+231+...+483
483=210+(n−1)21
∴27321=n−1
⇒n=14
∴S21=142[210+483]=4851
∴S=S3+S7−S21=34950+15050−4851
=50000−4851=45149.