Performance improvements for Primey Palindromes V2

Only evaluate g(n) for prime numbers (g(n) returns False for all
non-prime numbers).