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-10 of 10 results.

A260889 Primes having only {1, 2, 7} as digits.

Original entry on oeis.org

2, 7, 11, 17, 71, 127, 211, 227, 271, 277, 727, 1117, 1171, 1217, 1277, 1721, 1777, 2111, 2221, 2711, 2777, 7121, 7127, 7177, 7211, 7717, 7727, 11117, 11171, 11177, 11717, 11777, 12211, 12227, 12277, 12721, 17117, 21121, 21211, 21221, 21227, 21277, 21727
Offset: 1

Views

Author

Vincenzo Librandi, Aug 04 2015

Keywords

Comments

A020450, A020455 and A020459 are subsequences.

Crossrefs

Cf. Primes that contain only the digits (k,1,7): A199327 (k=0), this sequence (k=2), A260379 (k=3), A079651 (k=4), A260828 (k=5), A260891 (k=6), A260892 (k=8), A260893 (k=9).

Programs

  • Magma
    [p: p in PrimesUpTo(3*10^4) | Set(Intseq(p)) subset [1, 2, 7]];
  • Mathematica
    Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {1, 2, 7}] == {} &]
    Table[Select[FromDigits/@Tuples[{1,2,7},n],PrimeQ],{n,5}]//Flatten (* Harvey P. Dale, Apr 12 2018 *)

A261267 Primes having only {0, 2, 7} as digits.

Original entry on oeis.org

2, 7, 227, 277, 727, 2027, 2207, 2707, 2777, 7027, 7207, 7727, 20707, 22027, 22277, 22727, 22777, 27077, 27277, 70207, 72077, 72227, 72277, 72707, 72727, 200227, 202277, 202777, 207227, 222007, 222707, 227027, 227207, 227707, 272227, 272777, 277007
Offset: 1

Views

Author

Vincenzo Librandi, Aug 13 2015

Keywords

Comments

A020459 is a subsequence.

Crossrefs

Cf. Primes that contain only the digits (0,2,k): A036953 (k=1), A260125 (k=3), this sequence (k=7), A261268 (k=9).

Programs

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

A261182 Primes having only {2, 7, 9} as digits.

Original entry on oeis.org

2, 7, 29, 79, 97, 227, 229, 277, 727, 797, 929, 977, 997, 2297, 2729, 2777, 2797, 2927, 2999, 7229, 7297, 7727, 7927, 9227, 9277, 9929, 22229, 22277, 22279, 22727, 22777, 27277, 27299, 27779, 27799, 27997, 29297, 29927, 72227, 72229, 72277, 72727, 72797
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2015

Keywords

Comments

A020459, A020460 and A020471 are subsequences.

Crossrefs

Cf. similar sequences listed in A261181.

Programs

  • Magma
    [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [2, 7, 9]];
    
  • Mathematica
    Select[Prime[Range[2 10^4]], Complement[IntegerDigits[#], {2, 7, 9}] == {} &]
    Select[Flatten[Table[FromDigits/@Tuples[{2,7,9},n],{n,5}]],PrimeQ] (* Harvey P. Dale, Dec 17 2024 *)
  • Python
    from gmpy2 import is_prime
    from itertools import product
    A261182_list = [int(''.join(d)) for l in range(1,10) for d in product('279',repeat=l) if is_prime(int(''.join(d)))] # Chai Wah Wu, Aug 11 2015

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
    

A385787 Primes having only {2, 6, 7} as digits.

Original entry on oeis.org

2, 7, 67, 227, 277, 677, 727, 2267, 2677, 2767, 2777, 6277, 7727, 22277, 22727, 22777, 26227, 26267, 26627, 26777, 27277, 27767, 62627, 67777, 72227, 72277, 72727, 72767, 76667, 76777, 77267, 226267, 226777, 227267, 227627, 262627, 266677, 266767, 267227
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020459, A020469.

Programs

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

A385789 Primes having only {2, 7, 8} as digits.

Original entry on oeis.org

2, 7, 227, 277, 727, 787, 827, 877, 887, 2287, 2777, 2887, 7727, 7877, 8287, 8887, 22277, 22727, 22777, 22787, 22877, 27277, 27827, 28277, 72227, 72277, 72287, 72727, 78277, 78787, 78877, 78887, 82727, 82787, 87277, 87877, 87887, 222787, 222877, 227827, 228887
Offset: 1

Views

Author

Jason Bard, Jul 13 2025

Keywords

Crossrefs

Supersequence of A020459, A020470.

Programs

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

A284921 Numbers with digits 2 and 7 only.

Original entry on oeis.org

2, 7, 22, 27, 72, 77, 222, 227, 272, 277, 722, 727, 772, 777, 2222, 2227, 2272, 2277, 2722, 2727, 2772, 2777, 7222, 7227, 7272, 7277, 7722, 7727, 7772, 7777, 22222, 22227, 22272, 22277, 22722, 22727, 22772, 22777, 27222, 27227, 27272, 27277, 27722, 27727
Offset: 1

Views

Author

Jaroslav Krizek, Apr 05 2017

Keywords

Comments

Prime terms are in A020459.

Crossrefs

Cf. Numbers with digits 2 and k only for k = 0 - 1 and 3 - 9: A169965 (k = 0), A007931 (k = 1), A032810 (k = 3), A284920 (k = 4), A072961 (k = 5), A284632 (k = 6), this sequence (k = 7), A284922 (k = 8), A284923 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {2, 7}]
  • Mathematica
    Flatten@ Array[FromDigits /@ Tuples[{2, 7}, #] &, 5] (* Michael De Vlieger, Apr 06 2017 *)

A329760 Primes without {2, 7} as digits.

Original entry on oeis.org

3, 5, 11, 13, 19, 31, 41, 43, 53, 59, 61, 83, 89, 101, 103, 109, 113, 131, 139, 149, 151, 163, 181, 191, 193, 199, 311, 313, 331, 349, 353, 359, 383, 389, 401, 409, 419, 431, 433, 439, 443, 449, 461, 463, 491, 499, 503, 509, 541, 563, 569, 593, 599, 601, 613
Offset: 1

Views

Author

Alois P. Heinz, Nov 20 2019

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(700) | not 2 in Intseq(p) and not 7 in Intseq(p) ]; // Vincenzo Librandi, Jan 02 2020
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 2]==0 && DigitCount[#, 10, 7]==0 &] (* Vincenzo Librandi, Jan 02 2020 *)

Formula

{ A038604 } intersect { A038615 }.

A036312 Composite numbers whose prime factors contain no digits other than 2 and 7.

Original entry on oeis.org

4, 8, 14, 16, 28, 32, 49, 56, 64, 98, 112, 128, 196, 224, 256, 343, 392, 448, 454, 512, 554, 686, 784, 896, 908, 1024, 1108, 1372, 1454, 1568, 1589, 1792, 1816, 1939, 2048, 2216, 2401, 2744, 2908, 3136, 3178, 3584, 3632, 3878, 4096, 4432, 4802, 5089, 5488
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

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

Crossrefs

Programs

  • Maple
    dmax:= 4: # for terms < 2*10^dmax
    P:= {2,7}:
    L:= {7}:
    for d from 1 to dmax-1 do
      L:= map(t -> 2*10^d+t, L) union map(t -> 7*10^d+t, L);
      P:= P union select(isprime,L);
    od:
    R:= {1}: N:= 2*10^dmax:
    for p in P do
      R:= R union map(t -> seq(t*p^j,j=1..floor(log[p](N/t))), R)
    od:
    sort(convert(R minus P minus {1},list)); # Robert Israel, Aug 04 2020

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A020459} (p/(p - 1)) - Sum_{p in A020459} 1/p - 1 = 0.7041098484... . - Amiram Eldar, May 18 2022

A036938 Smallest n-digit prime containing only digits 2 and 7, or 0 if no such prime exists.

Original entry on oeis.org

2, 0, 227, 2777, 22277, 272227, 2227727, 22227277, 222222227, 2222222777, 22222222277, 222222272777, 2222222227727, 22222222777277, 222222222222227, 2222222222227727, 22222222222227227, 222222222227227727
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Showing 1-10 of 10 results.