login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers that have a nonprime number of prime digits.
2

%I #15 Sep 11 2023 23:18:03

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,24,26,28,29,30,

%T 31,34,36,38,39,40,41,42,43,44,45,46,47,48,49,50,51,54,56,58,59,60,61,

%U 62,63,64,65,66,67,68,69,70,71,74,76,78,79,80,81,82,83,84,85,86,87,88

%N Numbers that have a nonprime number of prime digits.

%e 24 has one prime digit 2 and their number 1 is nonprime;

%e 235719 has four prime digits 2,3,5,7 and their number 4 is nonprime.

%e 313 is not in the sequence as it has a prime number (2) of prime digits (3, 3). - _David A. Corneth_, Aug 09 2023

%p stev_sez:=proc(n) local i, tren, st, ans,anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_nepr:=proc(n) local i, stpf, ans, ans1; ans:=[ ]: stpf:=0: for i from 1 to n do if (isprime( ts_stpf(i) )='false') then ans:=[ op(ans), i ]: fi od; RETURN(ans) end: ts_nepr(600);

%t Select[Range[100],!PrimeQ[Count[IntegerDigits[#],_?PrimeQ]]&] (* _Harvey P. Dale_, Jan 15 2013 *)

%Y Cf. A019546.

%K nonn,easy,base

%O 1,2

%A _Jani Melik_, Apr 11 2004

%E Edited by _Charles R Greathouse IV_, Aug 03 2010