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 30 results.

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
    

A306855 Primes of the form 10^i + 10^j - 1.

Original entry on oeis.org

19, 109, 199, 1009, 1999, 10009, 10099, 100999, 199999, 1000099, 1000999, 19999999, 1000000009, 1000009999, 1000099999, 1009999999, 10000000999, 10000099999, 10999999999, 100999999999, 1000000009999, 1000000999999, 1099999999999, 10000000000099, 10009999999999, 100000000000099, 100000009999999
Offset: 1

Views

Author

Robert Israel, Mar 13 2019

Keywords

Comments

Primes p such that p+1 is in A052216.
Primes of the following form in base 10: 1, followed by 0 or more 0's, then 1 or more 9's.

Crossrefs

Cf. A052216. Subsequence of A199329.

Programs

  • Maple
    select(isprime, [seq(seq(10^n+10^m-1, m=1..n),n=1..15)]);
  • Mathematica
    Select[Flatten[Table[FromDigits[Join[PadRight[{1},n,0],PadRight[{},m,9]]],{n,20},{m,20}]],PrimeQ]//Sort (* Harvey P. Dale, May 15 2021 *)

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

Original entry on oeis.org

2, 11, 19, 29, 101, 109, 191, 199, 211, 229, 911, 919, 929, 991, 1009, 1019, 1021, 1091, 1109, 1129, 1201, 1229, 1291, 1901, 1999, 2011, 2029, 2099, 2111, 2129, 2221, 2909, 2999, 9001, 9011, 9029, 9091, 9109, 9199, 9209, 9221, 9901, 9929, 10009, 10091, 10099
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Crossrefs

Supersequence of A036953, A199329, A385776.

Programs

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

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

Original entry on oeis.org

3, 11, 13, 19, 31, 101, 103, 109, 113, 131, 139, 191, 193, 199, 311, 313, 331, 911, 919, 991, 1009, 1013, 1019, 1031, 1033, 1039, 1091, 1093, 1103, 1109, 1193, 1301, 1303, 1319, 1399, 1901, 1913, 1931, 1933, 1993, 1999, 3001, 3011, 3019, 3109, 3119, 3191, 3301
Offset: 1

Views

Author

Jason Bard, Jul 14 2025

Keywords

Comments

Primes that only contain digits that are 0 or integer powers of 3.

Crossrefs

Supersequence of A199329, A260044, A329761.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 3, 9]];
    
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 3, 9}, n], PrimeQ]
  • PARI
    primes_with(, 1, [0, 1, 3, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("0139"), 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
    

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

Original entry on oeis.org

11, 19, 61, 101, 109, 191, 199, 601, 619, 661, 691, 911, 919, 991, 1009, 1019, 1061, 1069, 1091, 1109, 1601, 1609, 1619, 1669, 1699, 1901, 1999, 6011, 6091, 6101, 6199, 6619, 6661, 6691, 6911, 6961, 6991, 9001, 9011, 9091, 9109, 9161, 9199, 9601, 9619, 9661, 9901
Offset: 1

Views

Author

Jason Bard, Jul 15 2025

Keywords

Crossrefs

Supersequence of A199326, A199329, A363023.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 6, 9]];
    
  • Maple
    f:= n-> (l-> add([0, 1, 6, 9][l[j]+1]*10^(j-1), j=1..nops(l)))(convert(n, base, 4)):
    select(isprime, [seq(f(i), i=0..250)])[];  # Alois P. Heinz, Jul 15 2025
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 6, 9}, n], PrimeQ]
  • PARI
    primes_with(, 1, [0, 1, 6, 9]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("0169"), 41))) # uses function/imports in A385776
    

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

Original entry on oeis.org

7, 11, 17, 19, 71, 79, 97, 101, 107, 109, 179, 191, 197, 199, 701, 709, 719, 797, 907, 911, 919, 971, 977, 991, 997, 1009, 1019, 1091, 1097, 1109, 1117, 1171, 1709, 1777, 1901, 1907, 1979, 1997, 1999, 7001, 7019, 7079, 7109, 7177, 7717, 7901, 7907, 7919, 9001
Offset: 1

Views

Author

Jason Bard, Jul 15 2025

Keywords

Crossrefs

Supersequence of A199327, A199329, A260893.

Programs

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

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

Original entry on oeis.org

11, 19, 89, 101, 109, 181, 191, 199, 809, 811, 881, 911, 919, 991, 1009, 1019, 1091, 1109, 1181, 1801, 1811, 1889, 1901, 1999, 8009, 8011, 8081, 8089, 8101, 8111, 8191, 8819, 8999, 9001, 9011, 9091, 9109, 9181, 9199, 9811, 9901, 10009, 10091, 10099, 10111, 10181
Offset: 1

Views

Author

Jason Bard, Jul 15 2025

Keywords

Crossrefs

Supersequence of A061247, A199329, A385783.

Programs

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

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

Original entry on oeis.org

5, 11, 101, 151, 1151, 1511, 10151, 10501, 11551, 15101, 15511, 15551, 100511, 110051, 115001, 150011, 150151, 151051, 1001551, 1051051, 1055501, 1115551, 1150151, 1150511, 1501501, 1510511, 1550551, 1551001, 1551551, 1555111, 10000511, 10011101, 10011511, 10055011, 10101551
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2011

Keywords

Comments

All terms, except for the initial 5, start and end with the digit '1'. This fact could be used to significantly speed up the given program.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10^8) | Set(Intseq(p)) subset [0,1,5] and IsPrime(Seqint(Reverse(Intseq(p))))]; // Bruno Berselli, Nov 07 2011
  • PARI
    a(n=50, list=0, L=[0, 1, 5], 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
    
Previous Showing 21-30 of 30 results.