[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A179027
Primes with a 3 as the only prime digit.
2
3, 13, 31, 43, 83, 103, 113, 131, 139, 163, 193, 311, 349, 389, 431, 439, 443, 463, 613, 631, 643, 683, 839, 863, 883, 983, 1013, 1031, 1039, 1063, 1093, 1103, 1163, 1193, 1301, 1319, 1361, 1381, 1399, 1439, 1483, 1493, 1613, 1663, 1693, 1831, 1913, 1931
OFFSET
1,1
COMMENTS
The digit 3 must appear only once. - Harvey P. Dale, Oct 12 2023
LINKS
MAPLE
filter:= proc(n) local L, t;
L:= convert(n, base, 10);
numboccur(3, L) = 1 and convert(L, set) intersect {2, 5, 7} = {}
end proc:
select(filter, [seq(ithprime(i), i=1..1000)]); # Robert Israel, Apr 21 2021
MATHEMATICA
Select[Prime[Range[300]], DigitCount[#, 10, 3]==1&&DigitCount[#, 10, 2]== DigitCount[#, 10, 5]== DigitCount[#, 10, 7]==0&] (* Harvey P. Dale, Oct 12 2023 *)
PROG
(Python)
from sympy import sieve
def ok(p): s=str(p); return set(s)&set("2357")=={'3'} and s.count('3')==1
def aupto(limit): return [p for p in sieve.primerange(1, limit+1) if ok(p)]
print(aupto(1931)) # Michael S. Branicky, Apr 21 2021
CROSSREFS
Cf. A179026.
Sequence in context: A248368 A171517 A179026 * A378946 A145907 A054554
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Jun 25 2010
EXTENSIONS
Corrected by Ray Chandler, Jul 13 2010
STATUS
approved