cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A214754 Primes that can be written in binary representation as a concatenation of odd primes.

This page as a plain text file.
%I A214754 #21 Jun 15 2025 20:55:38
%S A214754 23,29,31,47,59,61,71,79,109,113,127,151,157,167,179,191,223,229,233,
%T A214754 239,241,251,271,283,317,349,359,367,373,379,383,431,433,439,457,463,
%U A214754 467,479,487,491,499,503,509,541,563,599,607,631,701,719,727,733,743,751,757
%N A214754 Primes that can be written in binary representation as a concatenation of odd primes.
%C A214754 Subsequence of A090423.
%H A214754 David Radcliffe, <a href="/A214754/b214754.txt">Table of n, a(n) for n = 1..10000</a>
%e A214754 31 is 11111 in binary, 11 is 3 in decimal, 111 is 7, partition exists: 11_111, so 31 is in the sequence.
%o A214754 (Python)
%o A214754 # oddPrimes = [3, ... , 757]
%o A214754 def tryPartitioning(binString):  # First digit is not 0
%o A214754     if binString=='10':
%o A214754         return 0
%o A214754     l = len(binString)
%o A214754     for t in range(2, l-1):
%o A214754         substr1 = binString[:t]
%o A214754         if (int('0b'+substr1,2) in oddPrimes) or (t>=4 and tryPartitioning(substr1)):
%o A214754             substr2 = binString[t:]
%o A214754             if substr2[0]!='0':
%o A214754                 if (int('0b'+substr2,2) in oddPrimes) or (l-t>=4 and tryPartitioning(substr2)):
%o A214754                     return 1
%o A214754     return 0
%o A214754 for p in oddPrimes:
%o A214754     if tryPartitioning(bin(p)[2:]):
%o A214754         print(p, end=', ')
%Y A214754 Cf. A090423.
%K A214754 nonn,base
%O A214754 1,1
%A A214754 _Alex Ratushnyak_, Aug 03 2012