OFFSET
1,1
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
FORMULA
a(n) >> n^1.28 because of the digit restriction
EXAMPLE
13 is prime and it has one prime digit, 3;
103 is prime and it has one prime digit, 3.
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_prn:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( isprime(i)='true' and ts_stpf(i) = 1) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_prn(1000);
MATHEMATICA
podQ[n_]:=(1==Length@Select[IntegerDigits[n], PrimeQ]); Select[Prime[Range[250]], podQ](* Zak Seidov *)
PROG
(Sage) A092621 = list(p for p in primes(1000) if len([d for d in p.digits() if is_prime(d)]) == 1)
(PARI) isok(n) = isprime(n) && (d = digits(n)) && (sum(i=1, #d, isprime(d[i])) == 1); \\ Michel Marcus, Mar 10 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jani Melik, Apr 11 2004
STATUS
approved