login
A085413
Prime such that concatenation of it and its first digit is prime.
3
13, 19, 31, 37, 79, 103, 109, 151, 157, 181, 193, 331, 337, 353, 359, 367, 373, 379, 383, 751, 757, 787, 919, 941, 947, 953, 967, 971, 983, 1009, 1021, 1033, 1039, 1063, 1069, 1117, 1201, 1249, 1279, 1291, 1459, 1483, 1489, 1567, 1579, 1597, 1609, 1663, 1669
OFFSET
1,1
COMMENTS
Indices of primes in A085412; primes as concatenation of prime and its first digit in A085414.
LINKS
FORMULA
Prime[A085412]
EXAMPLE
13 is a term because concatenation of 13 and 1 is prime.
MAPLE
R:= NULL: count:= 0:
for d from 1 while count < 100 do
for a in [1, 3, 7, 9] do
for x from 1 to 10^d-1 by 2 while count < 100 do
if isprime(a*10^d + x) and isprime(a*10^(d+1)+10*x+a) then
R:= R, a*10^d+x; count:= count+1
fi od od od:
R; # Robert Israel, Mar 24 2023
PROG
(Python)
from itertools import count, islice
from sympy import isprime, primerange
def agen(): # generator of terms
for d in count(1):
for f in [1, 3, 7, 9]:
for p in primerange(f*10**d, (f+1)*10**d):
if isprime(10*p+f):
yield p
print(list(islice(agen(), 50))) # Michael S. Branicky, Mar 24 2023
CROSSREFS
Sequence in context: A040092 A079130 A243587 * A342943 A244311 A358530
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Jun 29 2003
STATUS
approved