Please help, TLE


I have made vector of primes still getting tle.