A085413 Prime such that concatenation of it and its first digit is prime.
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
Examples
13 is a term because concatenation of 13 and 1 is prime.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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
-
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
Formula
Prime[A085412]
Comments