[go: up one dir, main page]

login
A075807
Numbers n such that n-th prime is palindromic.
6
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,2
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)
FORMULA
a(n) = A000720(A002385(n)). - David A. Corneth, Mar 24 2019
EXAMPLE
26th prime is 101, which is palindromic.
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 *)
PROG
(Magma) [n: n in [1..3500] | Intseq(NthPrime(n), 10) eq Reverse(Intseq(NthPrime(n), 10))]; // Vincenzo Librandi, Mar 24 2019
(PARI) isok(n) = my(d=digits(prime(n))); Vecrev(d) == d; \\ Michel Marcus, Mar 24 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jani Melik, Oct 13 2002
EXTENSIONS
Edited by Dean Hickerson, Oct 21 2002
STATUS
approved