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

A068086 a(n) = A036229(n) - 111...1 (with n 1's).

Original entry on oeis.org

1, 0, 100, 1000, 1100, 10, 100, 110100, 1010, 10, 10010, 100000, 10110, 1110, 1000010, 1011000, 1010, 1000, 0, 101010, 10000, 100000, 0, 1000000, 1011000, 101100, 111100, 1110, 100010, 1010000, 1101010, 101010, 100100, 10
Offset: 1

Views

Author

Robert G. Wilson v, May 04 2002

Keywords

Crossrefs

Cf. A036229.

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

Original entry on oeis.org

0, 11, 101, 0, 10111, 101111, 1011001, 10010101, 100100111, 1000001011, 10000001101, 100000001111, 1000000111001, 10000000001011, 100000000100101, 1000000000011101, 10000000000001101, 100000000000100111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • PARI
    a(n) = for(k=2^(n-1), 2^n-1, v=binary(k); if(ispseudoprime(p=fromdigits(v)), return(p))); 0; \\ Jinyuan Wang, Mar 09 2020

A036937 Smallest n-digit prime containing only digits 2 and 3.

Original entry on oeis.org

2, 23, 223, 2333, 23333, 222323, 2222333, 22222223, 222323333, 2222232323, 22222222223, 222222333323, 2222222222323, 22222222223323, 222222222332233, 2222222222323223, 22222222222233323, 222222222222233323, 2222222222222233333, 22222222222222232233
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

It is conjectured that such a prime exists for every value of n.

Crossrefs

Programs

  • Mathematica
    Do[p = 2(10^n - 1)/9; k = 0; While[ ! PrimeQ[p], k++; p = FromDigits[ PadLeft[ IntegerDigits[k, 2], n] + 2]]; Print[p], {n, 1, 30}] (* Robert G. Wilson v, Apr 20 2002 *)
    Table[SelectFirst[FromDigits/@Tuples[{2,3},n],PrimeQ],{n,20}] (* Harvey P. Dale, Nov 07 2021 *)
  • Python
    from sympy import isprime
    from itertools import product
    def a(n):
      for b in product("01", repeat=n):
        m = int("".join(b).replace("0", "2").replace("1", "3"))
        if isprime(m): return m
      return None
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Feb 23 2021 after Robert G. Wilson v

Extensions

Edited by Jon E. Schoenfield, Mar 27 2014

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

Original entry on oeis.org

0, 11, 0, 4111, 11411, 0, 1114111, 11111141, 0, 1111111411, 11111141411, 0, 1111111111441, 11111111111411, 0, 1111111111114441, 11111111111414411, 0, 1111111111111111111, 11111111111111414441, 0, 1111111111111111144141
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

For any positive integer k, a(3k) = 0 as any 3k-digit number containing only digits 1 or 4 or both has a digit-sum divisible by 3 and thus the number is divisible by 3. - Rick L. Shepherd, Feb 08 2004

Crossrefs

Cf. A004022 (repunit primes), A004023.

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{1, 4}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)

Formula

a(3k) = 0 and a(A004023(k)) = (10^A004023(k) - 1)/9 = A004022(k) for all positive integers k. - Rick L. Shepherd, Feb 08 2004

Extensions

More terms from Rick L. Shepherd, Feb 08 2004

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

Original entry on oeis.org

7, 11, 0, 1117, 11117, 0, 1111711, 11111117, 0, 1111117171, 11111111771, 0, 1111111111177, 11111111171177, 0, 1111111111171177, 11111111111111171, 0, 1111111111111111111, 11111111111111117111, 0, 1111111111111111111711
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{1, 7}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)

Extensions

a(16) corrected by Jinyuan Wang, Mar 09 2020

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

Original entry on oeis.org

3, 43, 433, 3343, 33343, 333433, 3333433, 34333333, 333334333, 3333334343, 33333333343, 333333343333, 3333333333433, 33333333433333, 333333333334343, 3333333333333343, 33333333333433433, 333333333333334343
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[FromDigits/@Tuples[{3,4},n],PrimeQ],{n,18}] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 29 2015 *)

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

Original entry on oeis.org

7, 47, 0, 4447, 44777, 0, 4444747, 44447747, 0, 4444444447, 44444444747, 0, 4444444447777, 44444447447447, 0, 4444444447447777, 44444444444444477, 0, 4444444444444444777, 44444444444444444447, 0, 4444444444444444444747, 44444444444444444444477, 0
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{4,7},n],PrimeQ,1],{n,22}]/.{}->{0}] (* Harvey P. Dale, Jun 28 2012 *)

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

Original entry on oeis.org

0, 89, 0, 8999, 89899, 888989, 8888989, 88888999, 888898889, 8888888989, 88888888999, 888888898999, 8888888999899, 88888888888889, 888888888898999, 8888888888989999, 88888888888888889, 888888888888898889
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[10#+9&/@FromDigits/@Tuples[{8,9},n-1],PrimeQ],{n,20}]/. (Missing["NotFound"]->0) (* Harvey P. Dale, Feb 01 2018 *)

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

Original entry on oeis.org

3, 11, 113, 3313, 11113, 113111, 1111333, 11111131, 111111113, 1111113313, 11111111113, 111111133333, 1111111111333, 11111111113133, 111111111113113, 1111111111313131, 11111111111131333, 111111111111111131
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{1,3},n],PrimeQ,1],{n,18}]] (* Harvey P. Dale, Jul 23 2012 *)

Extensions

Corrected by Harvey P. Dale, Jul 23 2012

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

Original entry on oeis.org

5, 11, 151, 1151, 11551, 115151, 1111151, 15511151, 111151511, 1111115111, 11111151551, 111111111511, 1111111155151, 11111111511151, 111111111155111, 1111111111155151, 11111111111115151, 111111111115151551
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[FromDigits/@Tuples[{1,5},n],PrimeQ],{n,20}] (* Harvey P. Dale, Aug 04 2019 *)

Extensions

Corrected by Harvey P. Dale, Mar 19 2013
Showing 1-10 of 24 results. Next