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 11 results. Next

A199325 Primes having only {0, 1, 5} as digits.

Original entry on oeis.org

5, 11, 101, 151, 1051, 1151, 1511, 5011, 5051, 5101, 5501, 10111, 10151, 10501, 11551, 15101, 15511, 15551, 50051, 50101, 50111, 50551, 51001, 51151, 51511, 51551, 55001, 55051, 55501, 55511, 100151, 100501, 100511, 101051, 101111, 101501, 110051, 110501, 115001, 115151, 150001, 150011, 150151, 150551
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(160000) | Set(Intseq(p)) subset [0, 1, 5]]; // Vincenzo Librandi, Apr 22 2014
  • Maple
    N:= 10000: # to get the first N terms
    count:= 0:
    allowed:= {0,1,5}:
    nallowed:= nops(allowed):
    subst:= seq(i=allowed[i+1],i=0..nallowed-1):
    for d from 0 while count < N do
      for x1 from 1 to nallowed-1 while count < N do
        for t from 0 to nallowed^d-1 while count < N do
          L:= subs(subst,convert(x1*nallowed^d+t,base,nallowed));
          X:= add(L[i]*10^(i-1),i=1..d+1);
          if isprime(X) then
              count:= count+1;
              A[count]:= X;
          fi
    od od od:
    seq(A[n],n=1..N); # Robert Israel, Apr 20 2014
  • Mathematica
    Select[FromDigits/@Tuples[{0,1,5},6],PrimeQ] (* Harvey P. Dale, Jul 23 2021 *)
  • PARI
    L=[0,1,5];for(d=1,6,u=vector(d,i,10^(d-i))~;forvec(v=vector(d,i,[1+(i==1 & !L[1]),#L]),ispseudoprime(t=vector(d,i,L[v[i]])*u)&print1(t",")))  /* see A199327 for a function a(n) */
    

A199329 Primes having only {0, 1, 9} as digits.

Original entry on oeis.org

11, 19, 101, 109, 191, 199, 911, 919, 991, 1009, 1019, 1091, 1109, 1901, 1999, 9001, 9011, 9091, 9109, 9199, 9901, 10009, 10091, 10099, 10111, 10909, 11119, 11909, 19001, 19009, 19919, 19991, 90001, 90011, 90019, 90191, 90199, 90901, 90911, 91009, 91019, 91099, 91199, 91909, 99109, 99119, 99191, 99901, 99991
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,9},5],PrimeQ] (* Harvey P. Dale, Dec 10 2016 *)
  • PARI
    A199329(n=50,show=0,L=[0,1,9])={for(d=1,1e9,my(t,u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,[1+!(L[1]||(i>1&&iM. F. Hasler, Jul 25 2015

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 *)

A199326 Primes having only {0, 1, 6} as digits.

Original entry on oeis.org

11, 61, 101, 601, 661, 1061, 1601, 6011, 6101, 6661, 10061, 10111, 10601, 11161, 16001, 16061, 16111, 16661, 60101, 60161, 60601, 60611, 60661, 61001, 66161, 66601, 101111, 101161, 101611, 106661, 110161, 111611, 116101, 160001, 161611, 166601, 600011, 600101, 600601, 601061, 610661, 611011, 611101, 611111
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,6},6],PrimeQ] (* Harvey P. Dale, Dec 25 2018 *)
  • PARI
    {L=[0,1,6];for(d=1,6,u=vector(d,i,10^(d-i))~;forvec(v=vector(d,i,[1+(i==1 & !L[1]),#L]),ispseudoprime(t=vector(d,i,L[v[i]])*u)&print1(t",")))} /* see A199327 for a function a() */

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

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

Original entry on oeis.org

2, 7, 11, 17, 71, 101, 107, 127, 211, 227, 271, 277, 701, 727, 1021, 1117, 1171, 1201, 1217, 1277, 1721, 1777, 2011, 2017, 2027, 2111, 2207, 2221, 2707, 2711, 2777, 7001, 7027, 7121, 7127, 7177, 7207, 7211, 7717, 7727, 10007, 10111, 10177, 10211, 10271, 10711
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A036953, A199327, A260889.

Programs

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

A386025 Primes having only {0, 1, 3, 7} as digits.

Original entry on oeis.org

3, 7, 11, 13, 17, 31, 37, 71, 73, 101, 103, 107, 113, 131, 137, 173, 307, 311, 313, 317, 331, 337, 373, 701, 733, 773, 1013, 1031, 1033, 1103, 1117, 1171, 1301, 1303, 1307, 1373, 1733, 1777, 3001, 3011, 3037, 3137, 3301, 3307, 3313, 3331, 3371, 3373, 3701, 3733
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A199327, A260044, A260379.

Programs

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

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

Original entry on oeis.org

7, 11, 17, 41, 47, 71, 101, 107, 401, 701, 1117, 1171, 1447, 1471, 1741, 1747, 1777, 4001, 4007, 4111, 4177, 4441, 4447, 7001, 7177, 7411, 7417, 7477, 7717, 7741, 10007, 10111, 10141, 10177, 10477, 10711, 10771, 11047, 11071, 11117, 11171, 11177, 11411, 11447
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A079651, A199327, A260266.

Programs

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

A386032 Primes having only {0, 1, 5, 7} as digits.

Original entry on oeis.org

5, 7, 11, 17, 71, 101, 107, 151, 157, 557, 571, 577, 701, 751, 757, 1051, 1117, 1151, 1171, 1511, 1571, 1777, 5011, 5051, 5077, 5101, 5107, 5171, 5501, 5507, 5557, 5701, 5711, 5717, 7001, 7057, 7151, 7177, 7507, 7517, 7577, 7717, 7757, 10007, 10111, 10151, 10177
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A199325, A199327, A260828.

Programs

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

A386038 Primes having only {0, 1, 7, 8} as digits.

Original entry on oeis.org

7, 11, 17, 71, 101, 107, 181, 701, 787, 811, 877, 881, 887, 1087, 1117, 1171, 1181, 1187, 1777, 1787, 1801, 1811, 1871, 1877, 7001, 7177, 7187, 7717, 7817, 7877, 8011, 8017, 8081, 8087, 8101, 8111, 8117, 8171, 8707, 8807, 8887, 10007, 10111, 10177, 10181, 10711
Offset: 1

Views

Author

Jason Bard, Jul 15 2025

Keywords

Crossrefs

Supersequence of A061247, A199327, A260892.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 7, 8]];
    
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 7, 8}, n], PrimeQ]
  • PARI
    primes_with(, 1, [0, 1, 7, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("0178"), 41))) # uses function/imports in A385776
    
Showing 1-10 of 11 results. Next