login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A092626 Primes with one nonprime digit. 4

%I #7 Feb 18 2018 14:45:43

%S 13,17,29,31,43,47,59,67,71,79,83,97,127,137,157,173,229,239,251,263,

%T 271,283,293,307,313,317,331,347,359,367,379,383,397,433,457,503,521,

%U 547,563,571,587,593,653,673,677,739,743,751,787,797,823,827,853,857

%N Primes with one nonprime digit.

%C Heuristically, there are 15/(8 log 10) * n^(log_10 4) members up to n, or about 0.814 * n^0.602.

%H Harvey P. Dale, <a href="/A092626/b092626.txt">Table of n, a(n) for n = 1..1000</a>

%e 13 is prime and it has one nonprime digit, 1;

%e 3259 is prime and it has one nonprime digit, 9.

%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:

%p ts_stnepf:=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))='false') then stpf:=stpf+1; # number of nonprime digits fi od; RETURN(stpf) end:

%p ts_pr_neprn:=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_stnepf(i) = 1) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_neprn(4000);

%t Select[Prime[Range[200]],Count[IntegerDigits[#],_?(!PrimeQ[#]&)]==1&] (* _Harvey P. Dale_, Feb 18 2018 *)

%Y Cf. A019546.

%K nonn,base,easy

%O 1,1

%A _Jani Melik_, Apr 11 2004

%E Edited by R. J. Mathar, Nov 02 2009

%E Comment from _Charles R Greathouse IV_, Mar 19 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 07:48 EDT 2024. Contains 371235 sequences. (Running on oeis4.)