login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes consisting only of digits 0 and 1 occurring with equal frequency.
20

%I #20 Sep 20 2024 14:52:46

%S 10010101,10100011,1000011011,1000110101,1001000111,1001001011,

%T 1001010011,1010000111,1010001101,1010010011,1010100011,1010110001,

%U 1011000101,1100001101,1101001001,10000101011101,10000111100011,10000111110001,10001000011111,10001001011011

%N Primes consisting only of digits 0 and 1 occurring with equal frequency.

%C There are 18 digit pairs which can produce such primes: (1,0),(1,3),(1,4),(1,6),(1,7),(1,9),(2,3),(2,9),(3,4),(3,5),(3,7),(3,8),(4,7),(4,9),(5,9),(6,7),(7,9),(8,9).

%H Alois P. Heinz, <a href="/A087510/b087510.txt">Table of n, a(n) for n = 1..18167</a> (first 1000 terms from T. D. Noe)

%t Select[FromDigits/@Tuples[{0,1},14],PrimeQ[#] && Length[x=IntegerDigits[#]]==2*Count[x,0] &] (* _Jayanta Basu_, May 23 2013 *)

%o (PARI) \\ B(k,d1,d2,pred) k-digits of (d1,d2) each, satisfying pred.

%o B(k,d1,d2,pred)={my(L=List(),m=10^(2*k-1)); forsubset([2*k,k], s, my(t=(10^(2*k)-1)/9*d1 + (d2-d1)*sum(i=1, #s, 10^(s[i]-1))); if(t>=m && pred(t), listput(L,t))); vecsort(Vec(L))}

%o { concat(vector(7,k,B(k,0,1,isprime)))[1..20] } \\ _Andrew Howroyd_, Sep 20 2024

%Y Primes in A071925.

%Y The 18 sequences in this family are: this sequence (1,0), A087511 (1,3), A087512 (1,4), A087513 (1,6), A087514 (1,7), A087515 (1,9), A087527 (2,3), A087528 (2,9), A087529 (3,4), A087530 (3,5), A087531 (3,7), A087532 (3,8), A087533 (4,7), A087534 (4,9), A087535 (5,9), A087536 (6,7), A087537 (7,9), A087538 (8,9).

%K base,nonn

%O 1,1

%A _Paul D. Hanna_ and _Amarnath Murthy_, Sep 11 2003