login
Primes formed by concatenating odd primes.
0

%I #10 Aug 03 2012 10:29:34

%S 37,53,73,113,137,173,193,197,233,293,311,313,317,331,337,347,353,359,

%T 367,373,379,383,389,397,433,523,541,547,557,571,577,593,613,617,673,

%U 677,719,733,743,757,761,773,797,977,1013,1033,1093,1097,1117,1123,1129,1153

%N Primes formed by concatenating odd primes.

%C Subsequence of A019549.

%o (Python)

%o # oddPrimes = [3, ..., 1153]

%o def tryPartioning(binString): # First digit is not 0

%o l = len(binString)

%o for t in range(1, l):

%o substr1 = binString[:t]

%o if (int(substr1) in oddPrimes) or (t>=2 and tryPartioning(substr1)):

%o substr2 = binString[t:]

%o if substr2[0]!='0':

%o if (int(substr2) in oddPrimes) or (l-t>=2 and tryPartioning(substr2)):

%o return 1

%o return 0

%o for p in oddPrimes:

%o if tryPartioning(str(p)):

%o print p,

%Y Cf. A019549, A214754.

%K nonn,base

%O 1,1

%A _Alex Ratushnyak_, Aug 03 2012