A075807 Numbers n such that n-th prime is palindromic.
1, 2, 3, 4, 5, 26, 32, 36, 42, 43, 65, 71, 74, 76, 129, 134, 138, 139, 157, 158, 1263, 1285, 1293, 1367, 1377, 1483, 1519, 1528, 1583, 1635, 1647, 1682, 1726, 1805, 1814, 1867, 1897, 1917, 1928, 2009, 2060, 2083, 2117, 2196, 2250, 2260, 3255, 3267, 3285
Offset: 1
Examples
26th prime is 101, which is palindromic.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000 (n = 1..781 from Vincenzo Librandi, n = 782..5373 from David A. Corneth)
Programs
-
Magma
[n: n in [1..3500] | Intseq(NthPrime(n), 10) eq Reverse(Intseq(NthPrime(n), 10))]; // Vincenzo Librandi, Mar 24 2019
-
Maple
test := proc(n) local d; d := convert(ithprime(n),base,10); return ListTools[Reverse](d)=d; end; a := []; for n from 1 to 4000 do if test(n) then a := [op(a),n]; end; od; a;
-
Mathematica
Rest[Flatten[Position[Prime[Range[4000]],?(IntegerDigits[#] == Reverse[ IntegerDigits[#]]&)]]] (* _Harvey P. Dale, Jan 26 2014 *)
-
PARI
isok(n) = my(d=digits(prime(n))); Vecrev(d) == d; \\ Michel Marcus, Mar 24 2019
Formula
Extensions
Edited by Dean Hickerson, Oct 21 2002