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

A037053 Smallest prime containing exactly n 0's.

Original entry on oeis.org

2, 101, 1009, 10007, 100003, 1000003, 20000003, 100000007, 1000000007, 30000000001, 100000000003, 2000000000003, 40000000000001, 1000000000000037, 6000000000000001, 20000000000000003, 100000000000000003, 1000000000000000003, 60000000000000000007, 500000000000000000003
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

Certain entries require n+3 digits such as a(13). Those which do not require three digits besides n zeros are in A085824. Conjecture: a prime of this form, A037053, requires at most three judiciously placed nonzero digits, two on the exterior and one inside. - Robert G. Wilson v
The zeros in a(n) do not need to be consecutive. If the zeros must be consecutive we get a new sequence which agrees with this one up though a(31), but then here we have a(32) = 10000000000000000000000000000000603, whereas the smallest prime with exactly 32 consecutive zeros is 19000000000000000000000000000000009 = 19*10^33+9. - N. J. A. Sloane, Feb 20 2016
Sequence A269230 lists the indices (32, 43, 46, 49, 50, 60, 69, ...) for which a(n) does not have n consecutive digits '0', and gives more information about the smallest prime which has n consecutive digits '0': Sequence A269260 lists the values a > 9 such that the least prime with n *consecutive* '0's equals nextprime(a*10^(n+1)), for these indices n. - M. F. Hasler, Feb 20 2016 and Feb 22 2016
Since the definition requires "exactly" and not "at least" n 0's, the sequence is not increasing, e.g., a(22) = 10^24 + 49 > a(23) = 10^24 + 7. However, it seems that no term has more digits than its successor. - M. F. Hasler, Feb 20 2016
From Bob Selcoe, Feb 20 2016: (Start)
Conjecture 1: (following Robert G. Wilson v's conjecture above and insight provided by Hans Havermann): terms with two substrings of zeros have first digit of 1.
Conjecture 2: as n increases, there are more terms with two substrings of zeros than one consecutive string.
The logic is as follows: Let n = number of zeros and z = number of substrings of consecutive zeros contained in candidate primes. Candidates with two substrings of zeros (z=2) must be considered after only 72 smaller z=1 candidates have been considered and excluded, i.e., numbers of the form a[n zeros]b and 1[n zeros]ab, where a in {1..9}, b in {1,3,7,9}. After these 72 candidates are excluded, 36*n z=2 candidates are considered before having to consider only 36 additional z=1 candidates (i.e., 2[n zeros]ab), followed by 36*n additional z=2 candidates, etc. So as n increases, it becomes increasingly unlikely that any z=1 term appears. Additionally, the number of candidates increases as n increases for z>=3. For a given n, 1044 + 324*(n+1) candidates must be excluded before considering the smallest z=3: 1[n-2 zeros]10101. Since the probability p of n-digit primes occurring is p ~ 1/(n log 10) by the Prime Number Theorem, and the number of z in {1,2} candidates which must be excluded increases exponentially as n and z increase, it is unlikely that any z >= 3 term appears in A037053 and that first digit will be > 1 for any z=2 term.
Sequence A269233 lists the number of candidate primes < a(n); i.e., the number of excluded candidates.
(End)

Crossrefs

Cf. A037052, A034388, A085824. Least prime with n '1's,...,'9's: A037055, A037057, A037059, A037061, A037063, A037065, A037067, A037069, A037071. The indices of these primes are given in A037052 - A037070.
Cf. A269230, A269233 (number of candidate primes < a(n)), A269260.

Programs

  • Maple
    F:= proc(n)
    local a,b,cands,p;
    cands:= [seq(seq(10^(n+1)*a+b,b=[1,3,7,9]),a=1..9), seq(seq(seq(10^(n+2)+a*10^j+b,b=[1,3,7,9]),a=1..9),j=1..n+1)];
    for p in cands do if isprime(p) then return p fi od;
    error("No candidate is prime");
    end proc:
    2, seq(F(n),n=1..40); # Robert Israel, Feb 19 2016
  • Mathematica
    f[n_] := Block[{pc}, a = 1; While[a < 10, b = 1; While[b < 10, pc = a*10^(n + 1) + b; If[PrimeQ[pc], Goto[fini]]; b += 2]; a++]; e = 1; While[e < n + 2, b = 1; While[b < 10, c = 1; While[c < 10, pc = 10^(n + 2) + b*10^e + c; If[ PrimeQ[pc], Goto[ fini]]; c += 2]; b++]; e++]; Label[ fini]; pc]; f[0] = 2; Array[f, 25, 0] (* Robert G. Wilson v, Feb 21 2016 *)
  • PARI
    A037053(n)={n&&forstep(i=n=10^(n+1),9*n,n,nextprime(i)p*=10, forstep(j=i+p,i+9*p,p,nextprime(j)M. F. Hasler, Feb 19 2016

Formula

a(n) = prime(A037052(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Victoria A Sapko (vsapko(AT)canes.gsw.edu), Aug 16 2002
Edited by Robert G. Wilson v, Jul 04 2003
Sequence rechecked (by request) and edited by Charles R Greathouse IV, Aug 03 2010
Extended with a(0) = 2 and three lines of data completed by M. F. Hasler, Feb 19 2016

A037070 a(n)-th prime is the smallest prime containing exactly n 9's.

Original entry on oeis.org

1, 8, 46, 303, 5133, 17984, 216816, 1270607, 41146179, 420243162, 2524038155, 36159205628, 343392568900, 1955010428258, 15237833654620, 260219446617109, 2621513397605657, 24619309639366177, 233874804775621799, 684559920583084690, 20920441130654929928, 200085344903558463823
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037071 for f *) PrimePi[ Table[ f[n, 9], {n, 1, 13}]]

Formula

a(n) = A000720(A037071(n)). - Amiram Eldar, Jul 21 2025

Extensions

One more term from Vladeta Jovovic, Jan 10 2002
a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(14)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 21 2025

A037054 a(n)-th prime is the smallest prime containing exactly n 1's.

Original entry on oeis.org

1, 6, 5, 187, 1242, 9682, 86538, 733339, 5821735, 56196114, 503193257, 4161915701, 41621368333, 383118399789, 3549047966306, 33056584174792, 309353882119895, 2651938403956789, 27417323062119921, 27417323062119920, 2461813897281353902, 23422580231698331842
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037055 for f *) PrimePi[ Table[ f[n, 1], {n, 1, 13}]]

Formula

a(n) = A000720(A037055(n)). - Amiram Eldar, Jul 20 2025

Extensions

a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(14)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A037056 a(n)-th prime is the smallest prime containing exactly n 2's.

Original entry on oeis.org

2, 1, 48, 331, 2490, 94500, 1283805, 1402294, 12238270, 891573671, 975688072, 77612456753, 715763987889, 748327378591, 6944174236934, 580400102242316, 5209104353769836, 5710407472211223, 510579443617388387, 4806424039483242581, 45763276831811185976, 440594267900327752100
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037057 for f *) PrimePi[ Table[ f[n, 2], {n, 1, 13}]]

Formula

a(n) = A000720(A037057(n)). - Amiram Eldar, Jul 20 2025

Extensions

a(0)=2 prepended by Sean A. Irvine, Dec 06 2020
a(14)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A037058 a(n)-th prime is the smallest prime containing exactly n 3's.

Original entry on oeis.org

1, 2, 51, 345, 2602, 27062, 232466, 1935248, 17950160, 155123231, 1022275037, 13076476440, 119921146473, 1100928006234, 9986615648246, 39453679683959, 636484070277727, 8477216022186037, 80079195779613271, 758351887226957873, 7209429409009441899, 68676498683402943115
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037059 for f *) PrimePi[ Table[ f[n, 3], {n, 1, 13}]]

Formula

a(n) = A000720(A037059(n)). - Amiram Eldar, Jul 20 2025

Extensions

Edited and extended by Robert G. Wilson v, Jul 04 2003
a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(14)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A037060 a(n)-th prime is the smallest prime containing exactly n 4's.

Original entry on oeis.org

1, 13, 86, 603, 4620, 37299, 1533327, 22568442, 23574105, 210014510, 1893613727, 17241353173, 493582559244, 13474975578701, 71056054875827, 1180956491651370, 10728352138939963, 103710009988272649, 960912626678471376, 1005142876338508545, 50686811139876408310, 288867303325879381560
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037061 for f *) PrimePi[ Table[ f[n, 4], {n, 1, 12}]]

Formula

a(n) = A000720(A037061(n)). - Amiram Eldar, Jul 20 2025

Extensions

a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(13)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A037062 a(n)-th prime is the smallest prime containing exactly n 5's.

Original entry on oeis.org

1, 3, 102, 733, 14319, 45741, 1004275, 3313338, 169807396, 259770566, 20255937351, 21366409911, 196256438549, 10949682060338, 16876678891444, 1376534319069676, 13702579963679833, 13947379867469643, 360360819534753751, 3421022095727840569, 93257415087729395138, 113268191247939457737
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037063 for f *) PrimePi[ Table[ f[n, 5], {n, 1, 12}]]

Formula

a(n) = A000720(A037063(n)). - Amiram Eldar, Jul 20 2025

Extensions

a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(13)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A037064 a(n)-th prime is the smallest prime containing exactly n 6's.

Original entry on oeis.org

1, 18, 121, 859, 15226, 54070, 1071206, 3933314, 34614430, 309084622, 2792083255, 61496476037, 1214237371612, 5255429125063, 105341326636887, 458846460486827, 15441107727480784, 16660543186177748, 832868428561305574, 1494006786965549890, 14206605445888164436, 135418222271099812357
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037065 for f *) PrimePi[ Table[ f[n, 6], {n, 1, 12}]]

Formula

a(n) = A000720(A037065(n)). - Amiram Eldar, Jul 20 2025

Extensions

One more terms from Hans Havermann, Jun 16 2001
a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(13)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A037066 a(n)-th prime is the smallest prime containing exactly n 7's.

Original entry on oeis.org

1, 4, 59, 275, 4924, 58623, 506877, 4546755, 30224014, 87818618, 2836649805, 14748299309, 251285857122, 603200604933, 17530836835060, 80446298927642, 2054098188682332, 9577010472498628, 67026825574168206, 1605887402218872982, 16520076587958693329, 156502536697199220470
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037067 for f *) PrimePi[ Table[ f[n, 7], {n, 1, 12}]]

Formula

a(n) = A000720(A037067(n)). - Amiram Eldar, Jul 21 2025

Extensions

a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(14)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 21 2025

A037068 a(n)-th prime is the smallest prime containing exactly n 8's.

Original entry on oeis.org

1, 23, 152, 1107, 8611, 70478, 1793210, 5156463, 45470645, 2074530409, 11397691034, 33578243459, 1603686087003, 2859644709998, 26622184513952, 518238694402971, 2339285051888769, 69641948074252447, 208626752630607267, 8383527978057824838, 119921750787289924042, 375732914981870085595
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037069 for f *) PrimePi[ Table[ f[n, 8], {n, 1, 13}]]

Formula

a(n) = A000720(A037069(n)). - Amiram Eldar, Jul 21 2025

Extensions

a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(12) corrected and a(13)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 21 2025
Showing 1-10 of 10 results.