A019549 Primes formed by concatenating other primes.
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
Examples
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]
Links
- M. F. Hasler, Table of n, a(n) for n = 1..17495
- 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.
Programs
-
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
from sympy import isprime 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
Comments