cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A386056 Primes having only {0, 3, 4, 5} as digits.

This page as a plain text file.
%I A386056 #8 Jul 15 2025 21:17:00
%S A386056 3,5,43,53,353,433,443,503,3343,3433,3533,4003,5003,5303,5333,5443,
%T A386056 5503,30403,30553,33053,33343,33353,33403,33503,33533,34033,34303,
%U A386056 34403,34543,35053,35353,35533,35543,40343,40433,40543,43003,43403,43543,44053,44453,44533
%N A386056 Primes having only {0, 3, 4, 5} as digits.
%H A386056 Jason Bard, <a href="/A386056/b386056.txt">Table of n, a(n) for n = 1..10000</a>
%H A386056 <a href="/index/Pri#PrimesWithDigits">Index to entries for primes with digits in a given set</a>
%p A386056 f:= n-> (l-> add([0, 3, 4, 5][l[j]+1]*10^(j-1), j=1..nops(l)))(convert(n, base, 4)):
%p A386056 select(isprime, [seq(f(i), i=0..695)])[];  # _Alois P. Heinz_, Jul 15 2025
%t A386056 Select[FromDigits /@ Tuples[{0, 3, 4, 5}, n], PrimeQ]
%o A386056 (Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 3, 4, 5]];
%o A386056 (Python) print(list(islice(primes_with("0345"), 41))) # uses function/imports in A385776
%o A386056 (PARI) primes_with(, 1, [0, 3, 4, 5]) \\ uses function in A385776
%Y A386056 Supersequence of A199340, A199345, A260223.
%Y A386056 Cf. A000040, A030431, A385776.
%K A386056 nonn,base,easy
%O A386056 1,1
%A A386056 _Jason Bard_, Jul 15 2025