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-3 of 3 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

A269230 Indices for which A037053(n), the smallest prime with n digits '0', does not have n consecutive digits '0'.

Original entry on oeis.org

32, 43, 46, 49, 50, 60, 69, 72, 73, 74, 78, 82, 84, 86, 88, 90, 91, 93, 94, 95, 98, 101, 107, 108, 110, 115, 116, 121, 123, 124, 125, 126, 130, 132, 136, 137, 139, 144, 147, 149, 152, 153, 154, 156, 158, 159, 160, 161, 163, 164, 166, 169, 170, 171, 172, 173, 176, 177, 178, 179
Offset: 1

Views

Author

M. F. Hasler, Feb 20 2016

Keywords

Comments

Sequence A085824 lists the indices n for which A037053(n) has only two nonzereo digits, i.e., A037053(n) = a*10^(n+1) + b, with 1 <= a,b <= 9.
It is conjectured that, apart from A037053(0) = 2, all other terms have three nonzero digits and are therefore of the form A037053(n) = a*10^(n+2) + b*10^k + c, where 1 <= a,b,c <= 9 and 1 <= k <= n+1.
Whenever 1 < k < n+1, the n digits '0' are not consecutive but separated in two "chunks" of length n-k+1 and k-1, respectively. These indices n are listed here.
I conjecture that k < n+1 for all n (where k is function of n, of course).
For most indices n listed here, the smallest prime with n consecutive digits '0' is of the above form with k = n+1, i.e., of the form ab0...0c = (10a+b)*10^(n+1) + c.
The first index n for which this is not the case remains to be found. It can be expected that for this index n, the least prime with n consecutive digits '0' is either of the form a0...0b0c = a*10^(n+3) + b*100 + c (in which case it equals A037053(n+1)) or of the form a0...0bc with a > 9 (in which case it equals A037053(n+1) if a = 0 (mod 10)).
Sequence A269260 lists the values a > 9 such that the least prime with (at least) n consecutive '0's equals nextprime(a*10^(n+1)), for the numbers n listed here. - M. F. Hasler, Feb 22 2016
The first two values of n that do not satisfy the above forms are 192 and 213. The least prime with 192 consecutive 0's is 11100...0007. The least prime with 213 consecutive 0's is 100...000499. - Chai Wah Wu, Mar 11 2018

Programs

  • PARI
    for(n=1,999,n+2<#(t=digits(A037053(n))) && !t[#t-2] && print1(n","))
    
  • PARI
    a269230=[32]; A269230(n)={my(t); while(n>#a269230, for(k=vecmax(a269230)+1,9e9, (t=A037053(k))>10^(k+2) && t%10^(k+2)>99 && (a269230=concat(a269230,k)) && break));a269230[n]} \\ M. F. Hasler, Feb 22 2016

A300102 Smallest prime containing exactly n consecutive 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

Chai Wah Wu, Feb 25 2018

Keywords

Comments

Sequence agrees with A037053 up to a(31) (see comment in A037053). A269230 lists indices where these 2 sequences differ.
For the first 1001 terms of this sequence, the number of nonzero digits of each term is 4 or less. This differs from A037053 for which the number of nonzero digits is 3 or less for the first 12000 terms. Does there exist n such that a(n) has 5 or more nonzero digits?
a(n) has 3 nonzero digits for n = 13, 22, 29, 31, 32, 33, 40, 42, 43, ...
a(n) has 4 nonzero digits for n = 192, 213, 238, 250, 252, 257, 268, 293, 297, 303, ...
a(n) <> A037053(n) and a(n) = A037053(m) for some m > n for n = 436, 780, 845, 866, 894, 911, 945, 957, 967, ... In all these cases so far, a(n) has n+1 zero digits. Are there n satisfying these conditions such that a(n) has more than n+1 zero digits?
Sequence is not monotonically increasing; indices for which a(n) > a(n+1) are 22, 43, 47, 58, 67, 105, 108, 121, 132, 144, 192, 220, 238, 250, 252, 257, 261, 270, ...

Crossrefs

Showing 1-3 of 3 results.