Function find_primes(n) A = hashset with number between n*100, (n+1)*100 // hashset for faster lookup B = array with range(0, (n+1)*100) set True B[0] = B[1] = False p = 2 // for iteration limit1 = n*100 limit2 = (n+1)*100) // loop limit while (p*p < limit1): if (b(p) == True): for i in range(p*p, limit1, itarete with p) B[i] = False // change non primes to False p+=1 while (p*p < limit2): if (b(p) == True): for i in range(p*p, limit2, itarete with p) if i in A: A(i).remove // remove non primes from hashset p+=1 return A prime_numbers = find_primes(5) // find 3 digit primes starts with 5 print(prime_numbers) // display to terminal