cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A075807 Numbers n such that n-th prime is palindromic.

Original entry on oeis.org

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

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			26th prime is 101, which is palindromic.
		

Crossrefs

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

a(n) = A000720(A002385(n)). - David A. Corneth, Mar 24 2019

Extensions

Edited by Dean Hickerson, Oct 21 2002