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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A179027 Primes with a 3 as the only prime digit. 2

%I #9 Apr 21 2021 17:29:54

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

%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

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

Last modified September 28 13:02 EDT 2023. Contains 365735 sequences. (Running on oeis4.)