Compute all primes smaller than or equal to square root of n using simple sieve
int limit = ( int ) ( floor ( sqrt ( n ) ) + 1 ) ; Vector < Integer > prime = new Vector < > ( ) ; simpleSieve ( limit , prime ) ;