%I #7 Mar 11 2014 01:32:42
%S 2,3,5,7,11,13,17,23,29,31,37,41,47,61,67,71,73,97,113,127,131,193,
%T 199,223,227,251,257,263,383,449,463,479,487,503,509,521,577,911,967,
%U 1033,1087,1153,1567,1759,1787,1951,1987,1999,2011,2017,2081,2113,3583,3967
%N Write a prime p in binary. Consider the runs (that alternate between those of 1's and those of 0's) in this binary representation. Consider all binary numbers made by rearranging the runs, leaving each individual run intact, and starting each such binary number with a run of 1's, followed by a run of 0's, continuing to alternate runs of 1's and runs of 0's. A prime p is included in sequence A162855 if all such permutations of runs lead to prime values.
%e 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.
%e 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.
%Y Cf. A162856
%K base,nonn
%O 1,1
%A _Leroy Quet_, Jul 14 2009
%E Extended by _Ray Chandler_, Dec 18 2009
|