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.

Previous Showing 21-30 of 32 results. Next

A199303 Palindromic primes in the sense of A007500 with digits '0', '1' and '3' only.

Original entry on oeis.org

3, 11, 13, 31, 101, 113, 131, 311, 313, 1031, 1033, 1103, 1301, 3011, 3301, 10301, 10333, 11003, 11311, 13331, 30011, 30103, 31013, 31033, 33013, 33301, 101333, 110311, 113011, 113131, 131311, 133033, 133103, 301331, 301333, 330331, 333101, 333103, 1000033, 1001003, 1001303, 1003001
Offset: 1

Views

Author

M. F. Hasler, Nov 04 2011

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^8) | Set(Intseq(p)) subset [0, 1, 3] and IsPrime(Seqint(Reverse(Intseq(p))))]; // Bruno Berselli, Nov 07 2011
    
  • Mathematica
    Flatten[{#,IntegerReverse[#]}&/@Select[FromDigits/@Tuples[{0,1,3},7],AllTrue[ {#,IntegerReverse[ #]},PrimeQ]&]]//Union (* Harvey P. Dale, Sep 12 2023 *)
  • PARI
    allow=Vec("013"); forprime(p=1, default(primelimit), setminus( Set( Vec( Str( p ))), allow)&next; isprime(A004086(p))&print1(p", ")) /* for illustrative purpose only: better use the code below */
    
  • PARI
    a(n=50,list=0,L=[0,1,3],needpal=1)={ for(d=1,1e9, u=vector(d,i,10^(d-i))~; forvec(v=vector(d,i,[1+(i==1&!L[1]),#L]), isprime(t=vector(d,i,L[v[i]])*u) || next; needpal & !isprime(A004086(t)) & next; list & print1(t","); n-- || return(t)))}  \\ M. F. Hasler, Nov 06 2011
    
  • Python
    from itertools import product
    from sympy import isprime
    A199303_list = [n for n in (int(''.join(s)) for s in product('013',repeat=12)) if isprime(n) and isprime(int(str(n)[::-1]))] # Chai Wah Wu, Dec 17 2015

A199328 Palindromic primes in the sense of A007500 with digits '0', '1' and '8' only.

Original entry on oeis.org

11, 101, 181, 1181, 1811, 18181, 108881, 110881, 118081, 180181, 180811, 181081, 188011, 188801, 1008001, 1088081, 1110881, 1180811, 1181881, 1808801, 1880111, 1880881, 1881811, 1881881, 10001081, 10001801, 10011101, 10080011, 10101181, 10111001, 10111081, 10180801, 10188811, 10808101, 10810001
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Crossrefs

Intersection of A007500 and A061247.

Programs

  • Mathematica
    Select[10#+1&/@FromDigits/@Tuples[{0,1,8},7],AllTrue[{#,IntegerReverse[#]},PrimeQ]&] (* Harvey P. Dale, Mar 28 2025 *)
  • PARI
    a(n=50,L=[0,1,8],show=0)={my(t);for(d=1,1e9,u=vector(d,i,10^(d-i))~;forvec(v=vector(d,i,[1+(i==1&!L[1]),#L]),isprime(t=vector(d,i,L[v[i]])*u)||next;isprime(A004086(t))||next;show&print1(t",");n--||return(t)))}
    
  • Python
    from itertools import product
    from sympy import isprime
    A199328_list = [n for n in (int(''.join(s)) for s in product('018',repeat=10)) if isprime(n) and isprime(int(str(n)[::-1]))] # Chai Wah Wu, Dec 17 2015

A199304 Palindromic primes in the sense of A007500 with digits '0', '1' and '4' only.

Original entry on oeis.org

11, 101, 11411, 100411, 101141, 114001, 114041, 140411, 141101, 1004141, 1010411, 1040141, 1041041, 1100441, 1114111, 1140101, 1144441, 1401401, 1410401, 1411141, 1414001, 1440011, 1444411, 1444441, 10010411, 10011101, 10041011, 10044011
Offset: 1

Views

Author

M. F. Hasler, Nov 04 2011

Keywords

Comments

All terms start and end with the digit 1.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^8) | Set(Intseq(p)) subset [0,1,4] and IsPrime(Seqint(Reverse(Intseq(p))))];  // Bruno Berselli, Nov 07 2011
  • Maple
    F:= proc(d) local A0, A4, Res, q, r;
       Res:= NULL;
       q:= (10^(d+1)-1)/9;
       for A0 in combinat:-powerset({$1..d-1}) do
         for A4 in combinat:-powerset({$1..d-1} minus A0) do
           r:= q - add(10^i,i=A0) + 3*add(10^i,i=A4);
           if isprime(r) and isprime(q - add(10^(d-i),i=A0) + 3*add(10^(d-i),i=A4)) then
              Res:= Res, r
           fi
       od od;
       Res
    end proc:
    sort([seq(F(d),d=1..7)]); # Robert Israel, May 03 2018
  • PARI
    allow=Vec("014");forprime(p=1,default(primelimit),setminus( Set( Vec(Str( p ))),allow)&next;isprime(A004086(p))&print1(p",")) /* better use the more efficient code below */
    
  • PARI
    a(n=50,list=0,L=[0,1,4],needpal=1)={ for(d=1,1e9, u=vector(d,i,10^(d-i))~; forvec(v=vector(d,i,[1+(i==1&!L[1]),#L]), isprime(t=vector(d,i,L[v[i]])*u) || next; needpal & !isprime(A004086(t)) & next; list & print1(t","); n-- || return(t)))}  \\ M. F. Hasler, Nov 06 2011
    

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

Original entry on oeis.org

2, 5, 11, 101, 151, 211, 251, 521, 1021, 1051, 1151, 1201, 1511, 2011, 2111, 2221, 2251, 2521, 2551, 5011, 5021, 5051, 5101, 5501, 5521, 10111, 10151, 10211, 10501, 11251, 11551, 12011, 12101, 12211, 12251, 12511, 15101, 15121, 15511, 15551, 20011, 20021, 20051
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A036953, A199325, A385773.

Programs

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

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

Original entry on oeis.org

3, 5, 11, 13, 31, 53, 101, 103, 113, 131, 151, 311, 313, 331, 353, 503, 1013, 1031, 1033, 1051, 1103, 1151, 1153, 1301, 1303, 1511, 1531, 1553, 3001, 3011, 3301, 3313, 3331, 3511, 3533, 5003, 5011, 5051, 5101, 5113, 5153, 5303, 5333, 5351, 5501, 5503, 5531, 10103
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Subsequence of A036958.
Supersequence of A199325, A260044, A260224.

Programs

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

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

Original entry on oeis.org

5, 11, 41, 101, 151, 401, 541, 1051, 1151, 1451, 1511, 4001, 4051, 4111, 4441, 4451, 5011, 5051, 5101, 5441, 5501, 10111, 10141, 10151, 10501, 11411, 11551, 14011, 14051, 14401, 14411, 14551, 15101, 15401, 15451, 15511, 15541, 15551, 40111, 40151, 41011, 41051
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A199325, A260266, A260268.

Programs

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

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

Original entry on oeis.org

5, 11, 61, 101, 151, 601, 661, 1051, 1061, 1151, 1511, 1601, 5011, 5051, 5101, 5501, 5651, 6011, 6101, 6151, 6551, 6661, 10061, 10111, 10151, 10501, 10601, 10651, 11161, 11551, 15061, 15101, 15161, 15511, 15551, 15601, 15661, 16001, 16061, 16111, 16561, 16651
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Comments

Primes with decimal digits only in the set {0,1} mod 5.

Crossrefs

Supersequence of A199325, A199326, A385779.

Programs

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

Extensions

Mathematica program corrected by Harvey P. Dale, Aug 27 2025

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
    

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

Original entry on oeis.org

5, 11, 101, 151, 181, 811, 881, 1051, 1151, 1181, 1511, 1801, 1811, 5011, 5051, 5081, 5101, 5501, 5581, 5801, 5851, 5881, 8011, 8081, 8101, 8111, 8501, 8581, 10111, 10151, 10181, 10501, 11551, 11801, 15101, 15511, 15551, 15581, 15881, 18181, 50051, 50101, 50111
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A061247, A199325, A385780.

Programs

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

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

Original entry on oeis.org

5, 11, 19, 59, 101, 109, 151, 191, 199, 509, 599, 911, 919, 991, 1009, 1019, 1051, 1091, 1109, 1151, 1511, 1559, 1901, 1951, 1999, 5009, 5011, 5051, 5059, 5099, 5101, 5119, 5501, 5519, 5591, 9001, 9011, 9059, 9091, 9109, 9151, 9199, 9511, 9551, 9901, 10009, 10091
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A199325, A199329, A385781.

Programs

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