Python very fast solution
\nclass Solution:\n    def isPrime(self, num):\n        from math import sqrt\n        if num < 2 or num % 2 == 0:\n            return num == 2\n        for i i
```\nclass Solution:\n    def isPrime(self, num):\n        from math import sqrt\n        if num < 2 or num % 2 == 0:\n            return num == 2\n        for i in range(3, int(sqrt(num)) + 1, 2):\n            if num % i == 0:\n                return False\n        return True\n\n    def primePalindrome(self, n: int) -> int:\n        if 8 <= n <= 11:\n            return 11\n        if len(str(n)) % 2 == 0:\n            limit = pow(10, len(str(n)) // 2)\n        else:\n            n_string = str(n)\n            limit = n_string[:len(str(n)) // 2 + 1]\n        for i in range(int(limit), 20000):\n            y = int(str(i) + str(i)[:-1][::-1])\n            if y >= n and self.isPrime(y):\n                return y\n\n```
['Python']