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.

A127746 Smallest n-digit prime whose reversal is also prime.

Original entry on oeis.org

2, 13, 107, 1009, 10007, 100049, 1000033, 10000169, 100000007, 1000000007, 10000000207, 100000000237, 1000000000091, 10000000000313, 100000000000261, 1000000000000273, 10000000000000079, 100000000000000049
Offset: 1

Views

Author

Lekraj Beedassy, Jan 28 2007

Keywords

Comments

Smallest n-digit emirp (A006567).
Largest n-digit emirp is given by A114019.
Least emirp (A006567) greater than 10^(n-1). [Jonathan Vos Post, Nov 15 2009]
Palindromes not permitted (with the exception of the first term), so for example 101 is not a term. - Harvey P. Dale, Mar 11 2017

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 10^(n - 1), id, rid}, While[ id = IntegerDigits[k]; rid = Reverse[id]; ! PrimeQ[k] || ! PrimeQ[FromDigits[rid]] || id == rid, k++ ]; k]; Table[f[n], {n, 2, 19}] (* Ray Chandler, Jan 30 2007 *)
    sndp[n_]:=Module[{np=NextPrime[10^(n+1)]},While[PalindromeQ[np] || !PrimeQ[ IntegerReverse[ np]],np= NextPrime[np]];np]; Join[{2},Array[sndp,20,0]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 11 2017 *)

Extensions

Edited and extended by Ray Chandler, Jan 30 2007