login
Prime numbers containing an equal number of odd and even digits.
6

%I #27 Mar 07 2017 08:54:43

%S 23,29,41,43,47,61,67,83,89,1009,1021,1049,1061,1063,1069,1087,1201,

%T 1223,1229,1249,1283,1289,1409,1423,1427,1429,1447,1481,1483,1487,

%U 1489,1601,1607,1609,1621,1627,1663,1667,1669,1801,1823,1847,1861,1867,1889

%N Prime numbers containing an equal number of odd and even digits.

%C Can it be proved that this sequence has relative density 0 in the primes? Numbers with equal numbers of even and odd decimal digits have k * n/sqrt(log(n)) members up to n (k varies by upper or lower density). - _Charles R Greathouse IV_, Nov 12 2010

%H T. D. Noe, <a href="/A144226/b144226.txt">Table of n, a(n) for n = 1..10000</a>

%F A000040 INTERSECTION A227870. - _Jonathan Vos Post_, Nov 04 2013

%e The prime 1889 contains an equal number of odd and even digits.

%t fQ[n_] := Block[{id = IntegerDigits[n]}, Length[Select[id, OddQ]] == Length[Select[id, EvenQ]]]; Select[Prime[Range[300]], fQ] (* _Robert G. Wilson v_, Sep 24 2008 *)

%t eoQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,_?OddQ]==Count[ idn, _?EvenQ]]; Select[Prime[Range[300]],eoQ] (* _Harvey P. Dale_, Mar 07 2017 *)

%Y Cf. A000040, A144205, A227870.

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Sep 15 2008