OFFSET
1,1
COMMENTS
A subset of A085557 from the 4th term.
Upper relative density in the primes is 1; lower relative density in the primes is 0. - Charles R Greathouse IV, Nov 14 2010
EXAMPLE
22 has two prime digits and their number 2 is prime, so 22 is a term.
222 has three prime digits and their number 3 is prime, so 222 is a term.
MAPLE
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_pr:=proc(n) local i, stpf, ans, ans1; ans:=[ ]: stpf:=0: for i from 1 to n do if (isprime( ts_stpf(i) )='true') then ans:=[ op(ans), i ]: fi od; RETURN(ans) end: ts_pr(300);
# second Maple program:
q:= n-> isprime(nops(select(isprime, convert(n, base, 10)))):
select(q, [$1..500])[]; # Alois P. Heinz, Feb 08 2023
MATHEMATICA
Select[Range[250], PrimeQ[Count[IntegerDigits[#], _?PrimeQ]]&] (* Harvey P. Dale, Nov 29 2011 *)
PROG
(Python)
from itertools import count, islice
from sympy import isprime
def A092619_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:isprime(sum(1 for d in str(n) if d in {'2', '3', '5', '7'})), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jani Melik, Apr 11 2004
STATUS
approved