A167218 Primes whose reversal - 1 is a square.
2, 5, 71, 73, 101, 109, 263, 269, 523, 541, 587, 1061, 1063, 2089, 2251, 2273, 2297, 2843, 2861, 5441, 5477, 5483, 6203, 6221, 7129, 7507, 7937, 10009, 10163, 10169, 10487, 10691, 20201, 20693, 22391, 22769, 24023, 24877, 26141, 26171, 26723
Offset: 1
Examples
71 is prime and 17-1 = 16 = 4^2.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..7256
Crossrefs
Cf. A007488.
Programs
-
PARI
lista(nn) = {forprime(p=2, nn, if (issquare(eval(concat(Vecrev(Str(p))))-1), print1(p, ", ")););} \\ Michel Marcus, Dec 20 2015
-
Python
from sympy import isprime A167218_list, i, j = [], 0, 1 while j < 10**10: p = int(str(j)[::-1]) if j % 10 and isprime(p): A167218_list.append(p) j += 2*i+1 i += 1 A167218_list = sorted(A167218_list) # Chai Wah Wu, Dec 20 2015
Comments