The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A179027 Primes with a 3 as the only prime digit. 2

%I #11 Oct 12 2023 16:44:19

%S 3,13,31,43,83,103,113,131,139,163,193,311,349,389,431,439,443,463,

%T 613,631,643,683,839,863,883,983,1013,1031,1039,1063,1093,1103,1163,

%U 1193,1301,1319,1361,1381,1399,1439,1483,1493,1613,1663,1693,1831,1913,1931

%N Primes with a 3 as the only prime digit.

%C The digit 3 must appear only once. - _Harvey P. Dale_, Oct 12 2023

%H Robert Israel, <a href="/A179027/b179027.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local L,t;

%p L:= convert(n,base,10);

%p numboccur(3,L) = 1 and convert(L,set) intersect {2,5,7} = {}

%p end proc:

%p select(filter, [seq(ithprime(i),i=1..1000)]); # _Robert Israel_, Apr 21 2021

%t Select[Prime[Range[300]],DigitCount[#,10,3]==1&&DigitCount[#,10,2]== DigitCount[#,10,5]== DigitCount[#,10,7]==0&] (* _Harvey P. Dale_, Oct 12 2023 *)

%o (Python)

%o from sympy import sieve

%o def ok(p): s=str(p); return set(s)&set("2357")=={'3'} and s.count('3')==1

%o def aupto(limit): return [p for p in sieve.primerange(1, limit+1) if ok(p)]

%o print(aupto(1931)) # _Michael S. Branicky_, Apr 21 2021

%Y Cf. A179026.

%K nonn,base

%O 1,1

%A _Lekraj Beedassy_, Jun 25 2010

%E Corrected by _Ray Chandler_, Jul 13 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 June 7 18:53 EDT 2024. Contains 373206 sequences. (Running on oeis4.)