prog: find prime between 0-MAX-NUM