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”).

A019549
Primes formed by concatenating other primes.
12
23, 37, 53, 73, 113, 137, 173, 193, 197, 211, 223, 227, 229, 233, 241, 257, 271, 277, 283, 293, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397, 433, 523, 541, 547, 557, 571, 577, 593, 613, 617, 673, 677, 719, 727, 733, 743, 757, 761, 773, 797, 977
OFFSET
1,1
LINKS
Sylvester Smith, A Set of Conjectures on Smarandache Sequences, Bulletin of Pure and Applied Sciences, (Bombay, India), Vol. 15 E (No. 1), 1996, pp. 101-107.
EXAMPLE
113 is member as 11 and 3 are primes.
a(12)=227 = "2"+"2"+"7" is the first term not in A105184 (restricted to concatenation of two primes). [M. F. Hasler, Oct 15 2009]
PROG
(PARI) is_A019549(n, recurse=0)={ isprime(n) == recurse & return(recurse); for(i=1, #Str(n)-1, isprime( n%10^i ) & is_A019549( n\10^i, 1) & n\10^(i-1)%10 & return(1)) } \\ M. F. Hasler, Oct 15 2009
(Python)
def c(n, m):
if m > 0 and isprime(n): return True
s = str(n)
return any(s[i]!="0" and isprime(int(s[:i])) and c(int(s[i:]), m+1) for i in range(1, len(s)))
def ok(n): return isprime(n) and c(n, 0)
print([k for k in range(978) if ok(k)]) # Michael S. Branicky, Sep 01 2024
CROSSREFS
Sequence in context: A051362 A034302 A057878 * A272157 A129800 A105184
KEYWORD
nonn,base
AUTHOR
R. Muller
STATUS
approved