OFFSET
1,1
EXAMPLE
59, a prime, in binary is 111011. There is a run of three 1's, followed by a run of one 0, followed by a run of two 1's. There is only one other permutation of these runs that starts with a run of 1's, is followed by a run of the single 0, and finishes with a run of 1s. The other such binary number is 110111, which is 55. Since 55 is composite, then 59 is not in the sequence.
However, 37 in binary is 100101. The only other permutation of the runs which fits the conditions is 101001, which is 41 in decimal. Since both 37 and 41 are primes, then 37 (as well as 41) is in the sequence.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 14 2009
EXTENSIONS
Extended by Ray Chandler, Dec 18 2009
STATUS
approved