why this for loop is used here??

this is the question from november cook-off 2012…
and the link to the question is http://www.codechef.com/COOK28/problems/LEDIV/

and i found a solution for this…
the link to the solution is link text

i didnot understand the first for loop in the main function…plz help me to understand!!!
thanks…

See editorial for this problem. The array b[] coincide with smallestPrime[] from the editorial.

thank you… yaar

//