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.

A386048 Primes having only {0, 2, 4, 9} as digits.

This page as a plain text file.
%I A386048 #8 Jul 15 2025 21:17:08
%S A386048 2,29,229,409,449,499,929,2029,2099,2909,2999,4049,4099,4229,4409,
%T A386048 4909,4999,9029,9049,9209,9929,9949,20029,20249,20929,22229,22409,
%U A386048 24029,24049,24229,24499,29009,29209,29429,40009,40099,40429,40499,40949,42209,42299,42409
%N A386048 Primes having only {0, 2, 4, 9} as digits.
%H A386048 Jason Bard, <a href="/A386048/b386048.txt">Table of n, a(n) for n = 1..10000</a>
%H A386048 <a href="/index/Pri#PrimesWithDigits">Index to entries for primes with digits in a given set</a>
%p A386048 f:= n-> (l-> add([0, 2, 4, 9][l[j]+1]*10^(j-1), j=1..nops(l)))(convert(n, base, 4)):
%p A386048 select(isprime, [seq(f(i), i=0..620)])[];  # _Alois P. Heinz_, Jul 15 2025
%t A386048 Select[FromDigits /@ Tuples[{0, 2, 4, 9}, n], PrimeQ]
%o A386048 (Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 2, 4, 9]];
%o A386048 (Python) print(list(islice(primes_with("0249"), 41))) # uses function/imports in A385776
%o A386048 (PARI) primes_with(, 1, [0, 2, 4, 9]) \\ uses function in A385776
%Y A386048 Supersequence of A385768,  A385785.
%Y A386048 Cf. A000040, A030433, A385776.
%K A386048 nonn,base,easy
%O A386048 1,1
%A A386048 _Jason Bard_, Jul 15 2025