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.

A384449 Primes having only {0, 4, 7} as digits.

Original entry on oeis.org

7, 47, 4007, 4447, 7477, 44777, 47407, 47777, 74047, 74077, 74707, 74747, 77047, 77447, 77477, 77747, 407047, 407707, 407747, 440047, 444007, 444047, 470077, 470447, 474077, 474707, 477047, 477077, 704447, 704477, 704747, 704777, 707407, 707747, 740477, 744077, 744407, 744707, 747407, 770047
Offset: 1

Views

Author

Jason Bard, May 29 2025

Keywords

Crossrefs

Subsequence of A030432.
Supersequence of A020465.
Cf. Primes that contain only the digits (0,k,7): A199327 (k=1), A261267 (k=2), A260378 (k=3), this sequence (k=4), A260827 (k=5), A261181 (k=9).
Cf. A000040.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [0, 4, 7]];
    
  • Mathematica
    Select[FromDigits/@Tuples[{0, 4, 7}, 6], PrimeQ]
  • Python
    from sympy import sieve
    A384449 = [p for p in sieve.primerange(10**6) if all(n in ['0','4','7'] for n in str(p))] # Jwalin Bhatt,  Jun 02 2025
    
  • Python
    from itertools import count, islice
    from gmpy2 import digits, is_prime
    def A384449_gen(): # generator of terms
        for i in count(1):
            if is_prime(m:=int(digits(i,3).replace('1','4').replace('2','7'))):
                yield m
    A384449_list = list(islice(A384449_gen(),40)) # Chai Wah Wu, Jun 07 2025