login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A077360
Primes whose external digits as well as internal digits form a prime.
5
127, 131, 137, 139, 151, 157, 173, 179, 223, 229, 233, 239, 331, 337, 421, 431, 433, 457, 523, 631, 677, 733, 739, 751, 773, 823, 829, 839, 853, 859, 937, 977, 1021, 1031, 1033, 1039, 1051, 1117, 1171, 1193, 1231, 1237, 1291, 1297, 1319, 1373, 1433, 1439
OFFSET
1,1
COMMENTS
Intersection of A069686 and A077359.
EXAMPLE
139 is a term as 19 and 3 are both primes.
PROG
(PARI) forprime(p=1, 1440, if(isprime(indigs(p))&&isprime(exdigs(p)), print1(p, ", ")))
(Python)
from sympy import isprime, primerange
for p in primerange(100, 1440):
if isprime(int(str(p)[1:-1])) and isprime(int(str(p)[0]+str(p)[-1])):
print(p) # Jason Yuen, Apr 21 2024
CROSSREFS
Sequence in context: A334105 A077358 A069686 * A102636 A335314 A075595
KEYWORD
base,nonn,easy
AUTHOR
Amarnath Murthy, Nov 05 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Nov 06 2002
STATUS
approved