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
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