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

A065590 Smallest prime beginning with exactly n 7's.

Original entry on oeis.org

2, 7, 773, 77711, 77773, 7777709, 77777719, 777777701, 777777773, 77777777717, 777777777713, 777777777773, 7777777777771, 777777777777719, 777777777777773, 77777777777777711, 777777777777777737, 7777777777777777793, 77777777777777777729, 77777777777777777771
Offset: 0

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Crossrefs

Extensions

Corrected by Don Reble, Jan 17 2007
Offset corrected by Sean A. Irvine, Sep 06 2023

A065591 Smallest prime beginning with exactly n 8's.

Original entry on oeis.org

2, 83, 881, 8887, 88883, 888887, 88888817, 88888883, 888888883, 88888888801, 888888888859, 888888888887, 88888888888873, 88888888888889, 888888888888883, 88888888888888801, 88888888888888889, 8888888888888888813, 8888888888888888881, 888888888888888888857
Offset: 0

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Crossrefs

Extensions

Corrected by Don Reble, Jan 17 2007
Offset corrected by Sean A. Irvine, Sep 06 2023

A084673 Smallest prime in which a digit appears n times.

Original entry on oeis.org

2, 11, 1117, 10111, 101111, 1111151, 11110111, 101111111, 1111111121, 11111111113, 101111111111, 1111111118111, 11111111111411, 111111111116111, 1111111111111181, 11111111101111111, 101111111111111111
Offset: 1

Views

Author

Harvey P. Dale, Jun 29 2003

Keywords

Comments

For n > 1, conjectured to be equal to A037055(n), the smallest prime in { R-10^n, R-10^(n-1), ..., R-10; R+a*10^b, a = 1, ..., 8, b = 0, 1, 2, ..., n }, where R = (10^(n+1)-1)/9 is the (n+1)-digit repunit. - M. F. Hasler, Feb 25 2016

Examples

			a(4)=10111 because 10111 is the smallest prime with four duplicate digits.
		

References

  • Liz Strachan, Numbers are Forever, Mathematical Facts and Curiosities, Constable, London, 2014, page 267.

Crossrefs

Programs

  • Mathematica
    Table[ First[ Select[ Prime[ Range[100000]], Max[ DigitCount[ # ]]==i & ]], {i, 6}] (* or *)
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[ b, {i, 1, n}], {x}]], c = Complement[ Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[ r != Infinity, r, While[ !PrimeQ[k] || Count[ IntegerDigits[k], b] != n, k++ ]; k]]; Table[ f[n, 1], {n, 2, 18}]
  • PARI
    A084673(n)=if(n>1,A037055(n),2) \\ M. F. Hasler, Feb 25 2016

Extensions

Edited and extended by Robert G. Wilson v, Jul 03 2003

A065589 Smallest prime beginning with exactly n 6's.

Original entry on oeis.org

2, 61, 661, 6661, 666607, 666667, 66666629, 66666667, 666666667, 6666666661, 66666666667, 6666666666629, 66666666666629, 666666666666631, 66666666666666047, 66666666666666601, 6666666666666666059, 666666666666666661, 66666666666666666601, 66666666666666666667
Offset: 0

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[a = Table[6, {n}]; k = 0; While[b = FromDigits[ Join[a, IntegerDigits[k] ]]; First[ IntegerDigits[k]] == 6 || !PrimeQ[b], k++ ]; Print[b], {n, 1, 17} ]
  • PARI
    a(n) = {if(n==0, return(2)); my(cs = 60*(10^n\9), pow10 = 10); for(i = 1, oo, np = cs; d = 0; while(d < pow10, np = nextprime(np + 1); d = np - cs; if(d < pow10 && digits(d)[1] != 6 || 10*d < pow10, return(np))); cs*=10; pow10*=10)} \\ David A. Corneth, Sep 06 2023

Extensions

Corrected by Don Reble, Jan 17 2007
Offset corrected by Sean A. Irvine, Sep 06 2023

A088639 Smallest prime beginning with at least n n's (in decimal notation).

Original entry on oeis.org

2, 11, 223, 3331, 44449, 555557, 66666629, 777777701, 888888883, 99999999907, 1010101010101010101039, 11111111111111111111111, 12121212121212121212121223, 1313131313131313131313131301, 141414141414141414141414141497, 15151515151515151515151515151501
Offset: 0

Views

Author

Amarnath Murthy, Oct 27 2003

Keywords

Crossrefs

Cf. A088640. See A068120 for another version. See also A065584 - A065592.

Programs

  • Maple
    a:= proc(n) local d, h, s;
          s:= parse(cat(0, n$n));
          for d from 0 do
            for h to 10^d-1 do
              if isprime(s+h) then return s+h fi
            od:
            s:= s*10;
          od
        end:
    seq(a(n), n=0..16);  # Alois P. Heinz, Feb 11 2021
  • PARI
    A088639(n)={ local(p=10^#Str(n),d=1); n*=(p^n-1)/(p-1); until( (d*=10)*(n+1)>p=nextprime(n*d), );p} /* M. F. Hasler, Jan 13 2009 */
    
  • Python
    from sympy import isprime
    def a(n):
      if n == 0: return 2
      nns, i, pow10 = int(str(n)*n), 1, 1
      while True:
        i = 1
        while i < pow10:
          t = nns * pow10 + i
          if isprime(t): return t
          i += 2
        pow10 *= 10
    print([a(n) for n in range(16)]) # Michael S. Branicky, Feb 11 2021

Extensions

More terms from Ray Chandler, Nov 01 2003
More cross-references and initial term added by M. F. Hasler, Jan 13 2009

A105437 Smallest prime that remains prime when a string of n 1's is prepended to it.

Original entry on oeis.org

2, 3, 3, 7, 3, 83, 31, 7, 3, 29, 3, 53, 23, 439, 23, 53, 31, 71, 31, 79, 89, 233, 7, 3, 227, 487, 281, 31, 7, 227, 47, 439, 29, 47, 349, 491, 43, 31, 23, 7, 919, 701, 229, 283, 281, 59, 223, 2693, 53, 67, 239, 2011, 2113, 467, 41, 601, 587, 311, 337, 2879, 59, 619, 71
Offset: 0

Views

Author

Lekraj Beedassy, Apr 08 2005

Keywords

Examples

			a(3)=7 because it is the first prime before 31,59,61,71,73,97,... all remaining prime when 111 is prepended to each of them.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, t = Table[1, {n}]}, While[id = IntegerDigits[ Prime[k]]; id[[1]] == 1 || !PrimeQ[ FromDigits[ Join[t, id]]], k++ ]; Prime[k]]; Table[ f[n], {n, 0, 62}] (* Robert G. Wilson v, Apr 09 2005 *)

Extensions

More terms from Robert G. Wilson v, Apr 09 2005
Previous Showing 11-16 of 16 results.