Added a function to check concatenated primes.