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

A036933 Smallest n-digit prime containing only digits 1 and 6, or 0 if no such prime exists.

Original entry on oeis.org

0, 11, 661, 6661, 11161, 111611, 1111661, 11111161, 111616111, 1111161661, 11111111611, 111111111611, 1111111111661, 11111111616611, 111111111116111, 1111111111616161, 11111111111611661, 111111111111111161
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{0},Flatten[Table[Select[Sort[FromDigits/@Tuples[{1,6},i]], PrimeQ, 1], {i,2,20}]]] (* Harvey P. Dale, May 06 2014 *)

A036935 Smallest n-digit prime containing only digits 1 and 8, or 0 if no such prime exists.

Original entry on oeis.org

0, 11, 181, 1181, 18181, 0, 1111181, 11818181, 111111181, 1111111181, 11111188811, 0, 1111111118111, 11111111818181, 111111111111881, 1111111111111181, 11111111111188111, 0, 1111111111111111111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

a(6k) = 0 as any 6k-digit number containing only digits 1 or 8 is divisible by 7. - Jinyuan Wang, Mar 09 2020

Crossrefs

A036936 Smallest n-digit prime containing only digits 1 and 9, or 0 if no such prime exists.

Original entry on oeis.org

0, 11, 191, 1999, 11119, 111119, 1111991, 11111119, 111111199, 1111111919, 11111111911, 111111199919, 1111111119919, 11111111119111, 111111111119119, 1111111111111999, 11111111111111119, 111111111111191111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[FromDigits/@Tuples[{1,9},n],PrimeQ],{n,20}]/. Missing["NotFound"]->0 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 26 2020 *)

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

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

Original entry on oeis.org

2, 29, 229, 2999, 22229, 0, 2222929, 22229299, 222229229, 2222229299, 22222229299, 0, 2222222229229, 22222222222229, 222222222229229, 2222222222229299, 22222222222922299, 0, 2222222222222292929
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

a(6k) = 0 as any 6k-digit number containing only digits 2 or 9 is divisible by 7. - Jinyuan Wang, Mar 09 2020

Crossrefs

Programs

  • Mathematica
    Join[{2},Table[Min[Select[FromDigits/@(Join[#,{9}]&/@Tuples[{2,9},n]), IntegerLength[#]==n+1&&PrimeQ[#]&]],{n,20}]]/.\[Infinity]->0 (* Harvey P. Dale, Nov 08 2011 *)

A036941 Smallest n-digit prime containing only digits 3 and 5, or 0 if no such prime exists.

Original entry on oeis.org

3, 53, 353, 3533, 33353, 333533, 3335533, 33335333, 333535333, 3333353533, 33333353533, 333333533353, 3333333353353, 33333333555553, 333333333353353, 3333333333333533, 33333333333355333, 333333333333353533
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Maple
    A:= proc(n) local j,x,t;
      x:= (10^n-1)/3;
      for t from 1 to 2^n do
        if isprime(x) then return x fi;
        j:= padic:-ordp(t,2);
        x:= x  - (x mod 10^j) + (7 * 10^j-1)/3;
      od:
      0
    end proc:
    seq(A(n),n=1..100); # Robert Israel, Apr 22 2016
  • Mathematica
    Table[SelectFirst[FromDigits/@(Join[#,{3}]&/@Tuples[{3,5},n]),PrimeQ],{n,0,20}](* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Oct 07 2014 *)

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

Original entry on oeis.org

3, 37, 337, 3373, 33377, 333337, 3333373, 33333373, 333337777, 3333733373, 33333333377, 333333733333, 3333333377377, 33333333373777, 333333333337337, 3333333333373777, 33333333333337337, 333333333333337333
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

A036943 Smallest n-digit prime containing only the digits 3 and 8, or 0 if no such prime exists.

Original entry on oeis.org

3, 83, 383, 3833, 38333, 333383, 3333383, 38383883, 333388333, 3333333833, 33333333833, 333338838383, 3333333333383, 33333333888383, 333333333388883, 3333333333838883, 33333333333833383, 333333333333333833
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[FromDigits[Join[#,{3}]]&/@Tuples[{3,8},n],PrimeQ],{n,0,20}] /.Missing["NotFound"]->0 (* Harvey P. Dale, Aug 27 2022 *)

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

Original entry on oeis.org

0, 0, 449, 4999, 44449, 444449, 4444949, 44444999, 444499949, 4444444999, 44444449949, 444444494449, 4444449444949, 44444444449499, 444444444499499, 4444444444444999, 44444444444444999, 444444444449449949
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Examples

			44449 is the least prime of 5 digits containing just digits 4 and 9 so a(5) = 44449. - _David A. Corneth_, Oct 10 2019
		

Crossrefs

Programs

  • Mathematica
    Join[{0,0},Table[SelectFirst[10*FromDigits[#]+9&/@Tuples[{4,9},n],PrimeQ],{n,2,20}]] (* Harvey P. Dale, Aug 20 2021 *)
  • PARI
    a(n) = my(s=4*(10^(n)-1)/9);forstep(i=1, 2^n-1, 2, fr = fromdigits(5 * binary(i)) + s; if(isprime(fr), return(fr))); 0 \\ David A. Corneth, Oct 10 2019

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

Original entry on oeis.org

5, 0, 557, 5557, 57557, 555557, 5555777, 55555777, 555557557, 5555555557, 55555555777, 555555575557, 5555555757757, 55555555575757, 555555555555557, 5555555555557577, 55555555555777777, 555555555557557757, 5555555555555557577, 55555555555575755777
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Join[{5,0},Table[Select[FromDigits/@(Join[#,{7}]&/@Tuples[ {5,7},n]), PrimeQ,1],{n,2,20}]]] (* Harvey P. Dale, Mar 08 2013 *)

Extensions

More terms from Harvey P. Dale, Mar 08 2013
Previous Showing 11-20 of 24 results. Next