Driver method Finding all prime numbers before limit . These numbers are used to find prime factors .
sieveSundaram ( ) ; NEW_LINE print " Printing ▁ first ▁ few ▁ Smith ▁ Numbers ▁ using ▁ isSmith ( ) " NEW_LINE i = 1 NEW_LINE while i < 500 : NEW_LINE INDENT if isSmith ( i ) : NEW_LINE INDENT print i , NEW_LINE DEDENT i = i + 1 NEW_LINE DEDENT