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.

This page as a plain text file.
%I A127746 #12 Oct 10 2019 11:25:59
%S A127746 2,13,107,1009,10007,100049,1000033,10000169,100000007,1000000007,
%T A127746 10000000207,100000000237,1000000000091,10000000000313,
%U A127746 100000000000261,1000000000000273,10000000000000079,100000000000000049
%N A127746 Smallest n-digit prime whose reversal is also prime.
%C A127746 Smallest n-digit emirp (A006567).
%C A127746 Largest n-digit emirp is given by A114019.
%C A127746 Least emirp (A006567) greater than 10^(n-1). [_Jonathan Vos Post_, Nov 15 2009]
%C A127746 Palindromes not permitted (with the exception of the first term), so for example 101 is not a term. - _Harvey P. Dale_, Mar 11 2017
%H A127746 Harvey P. Dale, <a href="/A127746/b127746.txt">Table of n, a(n) for n = 1..100</a>
%t A127746 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 *)
%t A127746 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 *)
%Y A127746 Cf. A006567, A031991, A114019, A114018, A127747.
%Y A127746 Cf. A000040, A004086, A007500. [_Jonathan Vos Post_, Nov 15 2009]
%K A127746 nonn,base
%O A127746 1,1
%A A127746 _Lekraj Beedassy_, Jan 28 2007
%E A127746 Edited and extended by _Ray Chandler_, Jan 30 2007