login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114019 Largest n-digit prime whose digit reversal is also prime. 4
7, 97, 991, 9967, 99989, 999983, 9999971, 99999827, 999999893, 9999999967, 99999999977, 999999999959, 9999999999799, 99999999999959, 999999999999877, 9999999999999571, 99999999999997997, 999999999999999737, 9999999999999999719, 99999999999999999631 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..527
MATHEMATICA
f[n_] := Block[{k = 10^n}, While[ !PrimeQ[k] || !PrimeQ[FromDigits@Reverse@IntegerDigits@k], k-- ]; k]; Array[f, 19] (* Robert G. Wilson v, Nov 19 2005 *)
PROG
(Python)
from sympy import isprime
def c(n): return isprime(n) and isprime(int(str(n)[::-1]))
def a(n): return next(p for p in range(10**n-1, 10**(n-1), -2) if c(p))
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Jun 27 2022
CROSSREFS
Cf. A113018.
Sequence in context: A071361 A007810 A146758 * A178007 A241206 A127892
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 12 2005
EXTENSIONS
More terms from Robert G. Wilson v, Nov 19 2005
a(19) and beyond from Michael S. Branicky, Jun 27 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)