Cant get the whole concept of question

plzz explain on concept of prime seive optimisation

@G_rahil,
Redundant doubt, follow up here