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.

Showing 1-9 of 9 results.

A261183 Primes having only {4, 7, 9} as digits.

Original entry on oeis.org

7, 47, 79, 97, 449, 479, 499, 797, 947, 977, 997, 4447, 4799, 4999, 7477, 7499, 7949, 9479, 9497, 9749, 9949, 44449, 44497, 44777, 44797, 47497, 47777, 47779, 47797, 47947, 47977, 49477, 49499, 49747, 49999, 74449, 74747, 74779, 74797, 77447, 77477, 77479
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2015

Keywords

Comments

A020465, A020466 and A020471 are subsequences.

Crossrefs

Cf. similar sequences listed in A261181.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [4, 7, 9]];
  • Mathematica
    Select[Prime[Range[6 10^4]], Complement[IntegerDigits[#], {4, 7, 9}] == {} &]

A385784 Primes having only {2, 4, 7} as digits.

Original entry on oeis.org

2, 7, 47, 227, 277, 727, 2447, 2477, 2777, 4447, 7247, 7477, 7727, 22247, 22277, 22447, 22727, 22777, 24247, 27277, 27427, 42227, 42727, 44777, 47777, 72227, 72277, 72727, 74747, 77447, 77477, 77747, 222247, 242227, 242447, 242747, 244247, 244747, 272227
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020459, A020465.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 7}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [2, 4, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("247"), 41))) # uses function/imports in A385776
    

A385794 Primes having only {4, 6, 7} as digits.

Original entry on oeis.org

7, 47, 67, 467, 647, 677, 4447, 7477, 44647, 44777, 46447, 46477, 46747, 47777, 64667, 64747, 66467, 67447, 67477, 67777, 74747, 76667, 76777, 77447, 77477, 77647, 77747, 444677, 444767, 446447, 446477, 446647, 446767, 447467, 447677, 464447, 464467, 464647, 464747
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Subsequence of A030432.
Supersequence of A020465, A020469.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 6, 7]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{4, 6, 7}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [4, 6, 7]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("467"), 41))) # uses function/imports in A385776
    

A385795 Primes having only {4, 7, 8} as digits.

Original entry on oeis.org

7, 47, 487, 787, 877, 887, 4447, 4787, 4877, 7477, 7487, 7877, 8447, 8747, 8887, 44777, 44887, 47777, 48487, 48787, 48847, 74747, 74887, 77447, 77477, 77747, 78487, 78787, 78877, 78887, 84787, 87877, 87887, 88747, 444487, 444877, 444887, 447877, 474787, 474847
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Subsequence of A030432.
Supersequence of A020465, A020470.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 7, 8]];
    
  • Mathematica
    Flatten[Table[Select[FromDigits /@ Tuples[{4, 7, 8}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [4, 7, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("478"), 41))) # uses function/imports in A385776
    

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

A284971 Numbers with digits 4 and 7 only.

Original entry on oeis.org

4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777, 4444, 4447, 4474, 4477, 4744, 4747, 4774, 4777, 7444, 7447, 7474, 7477, 7744, 7747, 7774, 7777, 44444, 44447, 44474, 44477, 44744, 44747, 44774, 44777, 47444, 47447, 47474, 47477, 47744, 47747
Offset: 1

Views

Author

Jaroslav Krizek, Apr 07 2017

Keywords

Crossrefs

Prime terms are in A020465.
Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), this sequence (k = 7), A284972 (k = 8), A284973 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 7}]
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{4, 7}, n], {n, 5}] (* Giovanni Resta, Apr 08 2017 *)
  • PARI
    is(n) = my(x=Set([4, 7]), y=Set([0, 1, 2, 3, 5, 6, 8, 9])); if(#setintersect(Set(digits(n)), x) > 0 && #setintersect(Set(digits(n)), y)==0, return(1)); 0 \\ Felix Fröhlich, Apr 08 2017
    
  • Python
    def a(n):
      b = bin(n+1)[3:]
      return int("".join(b.replace("0", "4").replace("1", "7")))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Apr 07 2021

A036318 Composite numbers whose prime factors contain no digits other than 4 and 7.

Original entry on oeis.org

49, 329, 343, 2209, 2303, 2401, 15463, 16121, 16807, 31129, 52339, 103823, 108241, 112847, 117649, 209009, 217903, 313439, 334439, 351419, 366373, 523229, 542129, 542339, 544229, 726761, 757687, 789929, 823543, 1463063, 1525321, 2104519
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

All terms are a product of at least two terms of A020465. - David A. Corneth, Oct 09 2020

Crossrefs

Programs

  • Mathematica
    pf47Q[n_]:=Module[{u=Union[Flatten[IntegerDigits/@Transpose[ FactorInteger[ n]][[1]]]]},!PrimeQ[n]&&(u=={4}||u=={7}||u=={4,7})];Select[ Range[ 2200000],pf47Q] (* Harvey P. Dale, Jun 05 2013 *)

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A020465} (p/(p - 1)) - Sum_{p in A020465} 1/p - 1 = 0.0279830135... . - Amiram Eldar, May 22 2022

A036944 Smallest n-digit prime containing only the digits 4 and 7, or 0 if no such prime exists.

Original entry on oeis.org

7, 47, 0, 4447, 44777, 0, 4444747, 44447747, 0, 4444444447, 44444444747, 0, 4444444447777, 44444447447447, 0, 4444444447447777, 44444444444444477, 0, 4444444444444444777, 44444444444444444447, 0, 4444444444444444444747, 44444444444444444444477, 0
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{4,7},n],PrimeQ,1],{n,22}]/.{}->{0}] (* Harvey P. Dale, Jun 28 2012 *)

A386347 Primes without {4, 7} as digits.

Original entry on oeis.org

2, 3, 5, 11, 13, 19, 23, 29, 31, 53, 59, 61, 83, 89, 101, 103, 109, 113, 131, 139, 151, 163, 181, 191, 193, 199, 211, 223, 229, 233, 239, 251, 263, 269, 281, 283, 293, 311, 313, 331, 353, 359, 383, 389, 503, 509, 521, 523, 563, 569, 593, 599, 601, 613, 619, 631
Offset: 1

Views

Author

Jason Bard, Jul 20 2025

Keywords

Crossrefs

Intersection of A038612 and A038615.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 2, 3, 5, 6, 8, 9]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 4] == 0 && DigitCount[#, 10, 7] == 0 &]
  • PARI
    primes_with(, 1, [0, 1, 2, 3, 5, 6, 8, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("01235689"), 41))) # uses function/imports in A385776
    
Showing 1-9 of 9 results.