# [seqfan] Binary Primes In Binary Primes

Leroy Quet q1qq2qqq3qqqq at yahoo.com
Mon Mar 15 21:20:26 CET 2010

```Let a(1) = 2.
Let a(n) = either:
The smallest prime not yet occurring in the sequence that, when written in binary, it is a substring in the binary representation of a(n-1);
Or, if no such prime exists,
The smallest prime not yet occurring that when written in binary, a(n-1) is contained as a substring within it.

The sequence begins:
2,5,11,3,7,23,47,191,31,127,...

(I did this by hand, and may have made an error, even though I double-checked the terms.)

Written in binary, the sequence begins:
10,101,1011,11,111,10111,101111,10111111,11111,1111111

I was thinking without proof that the (decimal) sequence must certainly be a permutation of the primes.
But looking at the binary representations of the terms, I am not so sure now.

Is this sequence a permutation of the primes?

What about the sequence -- which starts with the same terms I give above -- that is defined the same, but the first "smallest" in the definition is replaced with "largest"?

In other words, this sequence:

Let b(1) = 2.
Let b(n) = either:
The largest prime not yet occurring in the sequence that, when written in binary, it is a substring in the binary representation of b(n-1);
Or, if no such prime exists,
The smallest prime not yet occurring that when written in binary, b(n-1) is contained as a substring within it.

Thanks,
Leroy Quet

[ ( [ ([( [ ( ([[o0Oo0Ooo0Oo(0)oO0ooO0oO0o]]) ) ] )]) ] ) ]

```