login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214754 Primes that can be written in binary representation as a concatenation of odd primes. 1
23, 29, 31, 47, 59, 61, 71, 79, 109, 113, 127, 151, 157, 167, 179, 191, 223, 229, 233, 239, 241, 251, 271, 283, 317, 349, 359, 367, 373, 379, 383, 431, 433, 439, 457, 463, 467, 479, 487, 491, 499, 503, 509, 541, 563, 599, 607, 631, 701, 719, 727, 733, 743, 751, 757 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Subsequence of A090423.
LINKS
EXAMPLE
31 is 11111 in binary, 11 is 3 in decimal, 111 is 7, partition exists: 11_111, so 31 is in the sequence.
PROG
(Python)
# oddPrimes = [3, ... , 757]
def tryPartioning(binString): # First digit is not 0
if binString=='10':
return 0
l = len(binString)
for t in range(2, l-1):
substr1 = binString[:t]
if (int('0b'+substr1, 2) in oddPrimes) or (t>=4 and tryPartioning(substr1)):
substr2 = binString[t:]
if substr2[0]!='0':
if (int('0b'+substr2, 2) in oddPrimes) or (l-t>=4 and tryPartioning(substr2)):
return 1
return 0
for p in oddPrimes:
if tryPartioning(bin(p)[2:]):
print p,
CROSSREFS
Cf. A090423.
Sequence in context: A240898 A244077 A277206 * A344375 A153631 A082943
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Aug 03 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 17:06 EDT 2024. Contains 372388 sequences. (Running on oeis4.)