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-5 of 5 results.

A089365 Smallest prime whose product of digits is 2^n.

Original entry on oeis.org

11, 2, 41, 181, 281, 1481, 881, 4481, 18481, 48281, 48481, 228881, 284881, 828881, 884881, 4448881, 4848881, 18848881, 24888881, 48888841, 88884881, 188888881, 888828881, 848888881, 4848488881, 4488888881, 18848888881, 28888884881
Offset: 0

Views

Author

Amarnath Murthy, Nov 07 2003

Keywords

Examples

			a(8) = 24481 and the digital product is 2^8.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ ! PrimeQ[k], k++ ]; k]; a = Table[0, {24}]; p = 2; Do[q = Log[2, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]  (* Robert G. Wilson v, Nov 08 2003 *)
    For a(8): a = Map[ FromDigits, Join[{0}, #, {1}] & /@ Permutations[{2, 8, 8 }]]; Min[ Select[a, PrimeQ[ # ] & ]] (* Robert G. Wilson v, Nov 08 2003 *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Nov 08 2003
a(24)-a(25) corrected by Chai Wah Wu, Aug 15 2017

A091465 Smallest prime with digit product 6^n.

Original entry on oeis.org

11, 23, 149, 389, 6389, 38669, 89899, 688999, 4998989, 46998899, 288989999, 2688989999, 8889899999, 68898899999, 1488988999999, 3888998899999, 128889898999999, 348889899899999, 1888888999999999, 16888888999999999
Offset: 0

Views

Author

Robert G. Wilson v, Jan 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {10}]; p = 2; Do[ q = Log[6, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]; a

A090840 Smallest prime whose product of digits is 5^n.

Original entry on oeis.org

11, 5, 11551, 15551, 1551551, 15551551, 1155555151, 1555551551, 11555555551, 1155155555551, 555555515551, 555555555551, 5555555555551, 555155555555551, 51555555551555551, 51555555555555551, 1155555555555555551, 15551555555555555551, 1155515555555555555551
Offset: 0

Views

Author

Robert G. Wilson v, Dec 09 2003

Keywords

Examples

			a(4) = 1551551 because its digital product is 5^4, and it is prime.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k, t; for k from 0 do t:= min(select(isprime,
          map(x-> parse(cat(x[])), combinat[permute]([1$k, 5$n]))));
          if tAlois P. Heinz, Nov 05 2021
  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {18}]; p = 2; Do[q = Log[5, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]
    For a(13); a = Map[ FromDigits, Permutations[{1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}]]; Min[ Select[a, PrimeQ[ # ] &]]
  • Python
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations as mp
    def a(n):
        if n < 2: return [11, 5][n]
        digits = n + 1
        while True:
            for p in mp("1"*(digits-n-1) + "5"*n, digits-1):
                t = int("".join(p) + "1")
                if isprime(t): return t
            digits += 1
    print([a(n) for n in range(19)]) # Michael S. Branicky, Nov 05 2021

Extensions

a(17) and beyond from Michael S. Branicky, Nov 05 2021

A090841 Smallest prime whose product of digits is 7^n.

Original entry on oeis.org

11, 7, 11177, 1777, 71777, 1777717, 1177717771, 77777177, 7177717777, 1777777777, 71777777777, 1717777777777, 7177777777777, 17777777777777, 17177777777777717, 7717777777777777, 1177777777177777777, 1777777777777777177, 7777177777777777777
Offset: 0

Views

Author

Robert G. Wilson v, Dec 09 2003

Keywords

Examples

			a(6) = 1177717771 because its digital product is 7^6, and it is prime.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k, t; for k from 0 do t:= min(select(isprime,
          map(x-> parse(cat(x[])), combinat[permute]([1$k, 7$n]))));
          if tAlois P. Heinz, Nov 07 2021
  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {18}]; p = 2; Do[q = Log[7, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]
    For a(8); a = Map[ FromDigits, Permutations[{1, 1, 7, 7, 7, 7, 7, 7, 7, 7}]]; Min[ Select[a, PrimeQ[ # ] &]]
  • Python
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations as mp
    def a(n):
        if n < 2: return [11, 7][n]
        digits = n
        while True:
            for p in mp("1"*(digits-n) + "7"*n, digits):
                t = int("".join(p))
                if isprime(t): return t
            digits += 1
    print([a(n) for n in range(19)]) # Michael S. Branicky, Nov 07 2021

Extensions

a(17) and beyond from Michael S. Branicky, Nov 07 2021

A089298 Smallest prime with digit product 10^n.

Original entry on oeis.org

11, 251, 14551, 155581, 4545551, 45555581, 555555881, 44555555581, 455555558581, 5555555888551, 255555555585881, 14555555558558851, 155555555858885551, 2555555555558885851, 45555555555585855881
Offset: 0

Views

Author

Amarnath Murthy, Oct 30 2003

Keywords

Comments

These numbers may not contain the digits {0, 3, 6, 7 or 9} and must end with the digit 1. Also the number of 2's plus half the number of 4's plus a quarter of the number of 8's must equal the number of 5's which in turn must equal n. - Robert G. Wilson v, Nov 06 2003

Examples

			a(4) = 4545551 and the digit product = 10^4.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {10}]; p = 2; Do[ q = Log[10, Times @@ IntegerDigits[p]]; If[q != 0 && IntegerQ[q] && a[[q]] == 0, a[[q]] = p; Print[q, " = ", p]]; p = NextPrim[p], {n, 1, 10^9}]; a

Extensions

Edited, corrected and extended by Robert G. Wilson v, Nov 06 2003
Showing 1-5 of 5 results.