login

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

Primes that contain the digit 4 or the digit 9.
3

%I #16 Jun 04 2023 19:24:16

%S 19,29,41,43,47,59,79,89,97,109,139,149,179,191,193,197,199,229,239,

%T 241,269,293,347,349,359,379,389,397,401,409,419,421,431,433,439,443,

%U 449,457,461,463,467,479,487,491,499,509,541,547,569,593,599,619,641,643

%N Primes that contain the digit 4 or the digit 9.

%H Daniel Starodubtsev, <a href="/A133765/b133765.txt">Table of n, a(n) for n = 1..10000</a>

%t Select[Prime[Range[250]], Length[Intersection[IntegerDigits[ # ], {4, 9}]] > 0 &] (* _Stefan Steinerberger_, Jan 03 2008 *)

%t Select[Prime[Range[250]],Total[DigitCount[#,10,{4,9}]]>0&] (* _Harvey P. Dale_, Jun 04 2023 *)

%o (Magma) [p:p in PrimesUpTo(650)| 4 in Intseq(p) or 9 in Intseq(p)]; // _Marius A. Burtea_, Feb 11 2020

%Y Cf. A000040, A109276.

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Jan 02 2008

%E Corrected and extended by _Stefan Steinerberger_, Jan 03 2008