login
Primes having only {0, 3, 5, 8} as digits.
1

%I #6 Jul 15 2025 23:58:27

%S 3,5,53,83,353,383,503,853,883,3083,3533,3583,3803,3833,3853,5003,

%T 5303,5333,5503,8053,8353,8803,30553,30803,30853,33053,33083,33353,

%U 33503,33533,35053,35083,35353,35533,35803,38053,38083,38303,38333,38803,38833,50033,50053

%N Primes having only {0, 3, 5, 8} as digits.

%H Jason Bard, <a href="/A386063/b386063.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Pri#PrimesWithDigits">Index to entries for primes with digits in a given set</a>

%t Select[FromDigits /@ Tuples[{0, 3, 5, 8}, n], PrimeQ]

%o (Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 3, 5, 8]];

%o (Python) print(list(islice(primes_with("0358"), 41))) # uses function/imports in A385776

%o (PARI) primes_with(, 1, [0, 3, 5, 8]) \\ uses function in A385776

%Y Supersequence of A260223, A260226, A261434.

%Y Cf. A000040, A030431, A385776.

%K nonn,base,easy

%O 1,1

%A _Jason Bard_, Jul 15 2025