Recursive functions filled in to truncate primes