OFFSET
1,1
COMMENTS
Subsequence of A090423.
LINKS
David Radcliffe, Table of n, a(n) for n = 1..10000
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 tryPartitioning(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 tryPartitioning(substr1)):
substr2 = binString[t:]
if substr2[0]!='0':
if (int('0b'+substr2, 2) in oddPrimes) or (l-t>=4 and tryPartitioning(substr2)):
return 1
return 0
for p in oddPrimes:
if tryPartitioning(bin(p)[2:]):
print(p, end=', ')
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Aug 03 2012
STATUS
approved
