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

A011540 Numbers that contain a digit 0.

Original entry on oeis.org

0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 301, 302
Offset: 1

Views

Author

Keywords

Comments

Complement of A052382.
A168046(a(n)) = 0; A054054(a(n)) = 0; A055640(a(n)) = 0 for n = 1 and A055640(a(n)) > 0 for n > 1; A055641(a(n)) > 0; subsequence of A188643. - Reinhard Zumkeller, Apr 25 2012, Apr 07 2011; corrected by Hieronymus Fischer, Jan 13 2013
A067898(a(n)) > 0. - Reinhard Zumkeller, May 04 2012; corrected by Hieronymus Fischer, Jan 13 2013
From Hieronymus Fischer, Jan 13 2013, May 28 2014; edited by M. F. Hasler; edited by Hieronymus Fischer, Dec 27 2018: (Start)
Zerofree floor: The greatest zerofree number < a(n) is A052382(a(n) + 1 - n).
The greatest zero-containing number (i.e., non-zerofree number, or term of this sequence) less than a given zerofree number A052382(n) is a(A052382(n) + 1 - n).
The ratio n/(a(n) + 1) indicates the relative proportion of zero-containing numbers less than or equal to a(n) compared to all numbers less than or equal to a(n). Since Lim_{n -> infinity} a(n)/n = 1, this can be expressed as "Almost all numbers contain a 0" (in a slightly informal manner).
As an example, for n = 10^100, n/(a(n) + 1) = 0.9999701184..., i.e., 99.997...% of all numbers between 0 and 10^100 contain a zero digit. Only the tiny proportion of 0.0000298816... (less than 0.003%) contain no zero digit. This is in contrast to the behavior for small indices, where the relative portion of numbers that contain no zero digit is significant: for n = 10^3 and even n = 10^7, the proportion of numbers less than or equal to n that contain no zero digit exceeds 81% and 53%, respectively.
Inversion: Given a number z that contains a zero digit, the index n for which a(n) = z is n = (z+1)*probability that a randomly chosen number k from the range 0..z contains a zero digit.
Example 1: z = 10; the probability that a randomly chosen number less than or equal to 10 contains no zero digit is 9/11. The probability that it contains a zero digit is p = 2/11. Thus, n = (z+1)*p = 2 and a(2) = 10.
Example 2: z = 10^6; the probability that a randomly chosen number with m > 1 digits contains no zero digit is (9/10)^(m-1). For m = 1 the probability is 9/10. The probability that a randomly chosen number with 1..m digits contains no zero digit is q = (9/10)*10/(10^m+1) + Sum_{i = 2..m} (9/10)^(i-1)*(10^i - 10^(i-1))/(10^m+1) = (72 + 81*(9^(m-1) - 1))/(8*(10^m+1)). Hence, the probability that the chosen number with 1..m digits contains a zero digit is p = 1 - q = (8*10^m - 9*9^m + 17)/(8*(10^m + 1)). Thus, p = 402131/1000001 (for z = 10^6) and so n = (z+1)*p = 402131, which implies a(402131) = 10^6.
The number of terms z such that k*10^m <= z < (k+1)*10^m is 10^m - 9^m, where 1 <= k < 10 and m >= 0.
The number of terms z such that 10^m <= z < 10^(m+1) is 9*(10^m - 9^m), where m >= 0.
The number of terms z <= 10^m is (8*10^m - 9*9^m + 17)/8 where m>=1 (cf. A217094).
Infinitely many terms are primes, and most primes are zero-containing numbers. Sketch of a proof: The number of zero-containing numbers less than or equal to a(n) is n. Hence there are a(n) + 1 - n zerofree numbers less than or equal to a(n). From the asymptotic behavior of a(n) (see formula section) it follows a(n) + 1 - n < (5/4)*n^log_10(9) for sufficiently large n. By the prime number theorem we have for each fixed d > 0 the relation pi(n) [number of primes less than or equal to n] > (1 - d/4)*(n/log(n)) for sufficiently large n. Thus, for the number of primes less than or equal to a(n) which contain a zero digit [hereafter denoted as P_0(a(n))] we have P_0(a(n)) > pi(a(n)) - (a(n) + 1 - n) > (1 - d/4)*a(n)/log(a(n)) - (5/4)*n^log_10(9) > (1-d/4)*n/log(n) - (5/4)*n^log_10(9) = (1-d/4)*n/log(n) * (1 - (5/4)*(1/(1-d/4))*(1/n) * n^(log_10(9))*log(n)) > (1-d/2)*n/log(n) for sufficiently large n. Because of a(n) = n + o(n) this also implies P_0(a(n)) > (1 - d)*a(n)/log(a(n)) for sufficiently large n. Thus, the proportion of primes less than or equal to a(n) which contain a zero digit compared to the total number of primes less than or equal to a(n) is arbitrarily near to 1 for sufficiently large n.
Sequence inversion:
Given a term m > 0, the index n such that a(n) = m can be calculated with the following procedure: Define k := floor(log_10(m)) and i := digit position of the leftmost '0' in m counted from the right (starting with 0), then:
A011540_inverse(m) = 2 + m mod 10^i + Sum_{j = 1..k} floor((m - 1 - m mod 10^i)/10^j)*9^(j-1) [see PROG section for an implementation in Smalltalk].
Example: m = 905, k = 2, i = 1, A011540_inverse(905) = 2 + 905 mod 10 + floor((905 - 1 - 905 mod 10)/10)*1 + floor((905 - 1 - 905 mod 10)/100)*9 = 2 + 5 + floor(899/10)*1 + floor(899/100)*9 = 2 + 5 + 89*1 + 8*9 = 168.
(End)
For the number of k-digit numbers containing the digit '0', see A229127. - Jon E. Schoenfield, Sep 14 2013
The above "sketch of proof" only compares the relative densities, and since the density of this sequence is 1, the result is "obvious". But the nontrivial part is that there is no correlation between the absence of a digit '0' and primality of the number (cf. A038618). Indeed, consider the set S defined to be the set of primes with all digits '0' replaced by the smallest possible nonzero digit while avoiding duplicates. Having exactly the same density as the set of primes, the argument of the proof applies in the same way and leads to the same conclusion for the number of zero-containing terms; however, there is none in the set S. - M. F. Hasler, Oct 11 2015, example added Feb 11 2019

Examples

			a(10)      = 90.
a(100)     = 540.
a(10^3)    = 4005.
a(10^4)    = 30501.
a(10^5)    = 253503.
a(10^6)    = 2165031.
a(10^7)    = 20163807
a(10^8)    = 182915091.
a(10^9)    = 1688534028.
a(10^10)   = 15749319096.
a(10^20)   = 114131439770460123393.
a(10^50)   = 10057979971082351274741...89870962249 = 1.0057979971082...*10^50
a(10^100)  = 10000298815737485...786424499 = 1.0000298815737...*10^100.
a(10^1000) = 1...(45 zeros)...196635515818798306...4244999 (1001 digits), using recursive calculation. - _Hieronymus Fischer_, Jan 13 2013
		

Crossrefs

Programs

  • Haskell
    a011540 n = a011540_list !! (n-1)
    a011540_list = filter ((== 0) . a168046) [0..]
    -- Reinhard Zumkeller, Apr 07 2011
    
  • Magma
    [0] cat [ n: n in [0..350] | 0 in Intseq(n) ]; // Vincenzo Librandi, Oct 12 2015
    
  • Mathematica
    Select[Range[0, 299], DigitCount[#, 10, 0] > 0 &] (* Alonso del Arte, Mar 10 2011 *)
    Select[Range[0, 299], Times@@IntegerDigits[#] == 0 &] (* Alonso del Arte, Aug 29 2014 *)
  • PARI
    is(n)=!n||!vecmin(digits(n)) \\ M. F. Hasler, Feb 28 2018, replacing an earlier version from Charles R Greathouse IV, Aug 09 2011
    
  • PARI
    A011540(n)=my(m=log(n+.5)\log(10)+1, f(m)=n-10^m+(9*9^m-17)/8, j=(sign(f(m)+1)+1)\2+m-1, c=[f(j)], k=1); while(c[k]>0,c=concat(c,c[k] % (10^(j-k+1) - 9^(j-k+1)) - 10^(j-k));k++); k>1&&k--||n>1||return(0); c[k]%(10^(j-k+1) - 9^(j-k+1)) + sum(i=1,k, (c[i]\(10^(j-i+1) - 9^(j-i+1)) + 1)*10^(j-i+1)) \\ Uses the "Direct calculation" formula given by H. Fischer. - M. F. Hasler, Oct 11 2015
    
  • Python
    A011540_list = [n for n in range(10**3) if '0' in str(n)] # Chai Wah Wu, Mar 26 2021
  • Smalltalk
    A011540
    "Calculates the n-th number with zero digits recursively - not optimized"
    | n j m b d p r |
    n := self.
    n < 2 ifTrue: [^r := 0].
    m := (n integerFloorLog: 10) + 1.
    j := (n + 1 - ((10 raisedToInteger: m) - (((9 raisedToInteger: (m + 1)) - 17) // 8))) sign + 1 // 2 + m - 1.
    d := (10 raisedToInteger: j) - (9 raisedToInteger: j).
    b := ((10 raisedToInteger: j) - (((9 raisedToInteger: (j + 1)) - 17) // 8)).
    (((n - b) \\ d > (10 raisedToInteger: (j - 1))) and: [n >= 19])
    ifTrue:
    [p := (((n - b) \\ d + b - d) A011540)].
    (n - b) \\ d > (10 raisedToInteger: (j - 1))
    ifFalse: [p := (n - b) \\ d].
    r := (((n - b) // d + 1) * (10 raisedToInteger: j)) + p.
    ^r "Hieronymus Fischer, Jan 13 2013"
    
  • Smalltalk
    A011540_inverse
    "Version 1: Answers the index n such that A011540(n) = m, where m is the receiver.
    Usage: m A011540_inverse
    Answer: n"
    | m p q s r d |
    m := self.
    m < 10 ifTrue: [^1].
    p := q := 1.
    [p < m] whileTrue:
    [d := m // p \\ 10.
    d = 0 ifTrue: [q := p].
    p := 10 * p].
    r := m \\ q.
    s := r + 2.
    p := 10.
    q := 1.
    m := m - r - 1.
    [p < m] whileTrue:
    [s := m // p * q + s.
    p := 10 * p.
    q := 9 * q].
    ^s
    "Hieronymus Fischer, May 28 2014"
    
  • Smalltalk
    A011540_inverse
    "Version 2: Answers the index n such that A011540(n) = m, where m is the receiver.
    Uses A052382_inverse from A052382.
    Usage: m A011540_inverse
    Answer: n"
    | m p q d |
    m := self.
    m < 10 ifTrue: [^1].
    p := q := 1.
    [p < m] whileTrue:
    [d := m // p \\ 10.
    d = 0 ifTrue: [q := p].
    p := 10 * p].
    ^m + 1 - (m - 1 - (m \\ q)) A052382_inverse
    "Hieronymus Fischer, May 28 2014"
    

Formula

From Hieronymus Fischer, Jan 13 2013: (Start)
Inequalities:
a(n) <= 10*(n - 1), equality holds for 1 <= n <= 11.
a(n) <= 9*n, for n <> 11.
a(n) < n + 10 * n^log_10(9).
a(n) < n + 2 * n^log_10(9), for n > 6*10^8.
a(n) > n + 9^log_10(9)/8 * n^log_10(9).
a(n) < A043489(n), for n > 10.
Iterative calculation:
a(n+1) = a(n) + 1 + 9*sign(A007954(a(n)+1)).
Recursive calculation (for n > 1):
Set m := floor(log_10(n)) + 1), j := floor(sign(n+1 - (8*10^m - 9*9^m + 17)/8) + 1)/2) + m - 1, d := 10^j - 9^j, b := (8*10^j - 9*9^j + 17)/8, and determine r(n) as follows:
Case 1: r(n) = a(b - d + (n - b) mod d), if (n - b) mod d > 10^(j-1) and n >= 19
Case 2: r(n) = (n - b) mod d, if (n - b) mod d <= 10^(j-1).
Then a(n) = (floor((n - b)/d) + 1)*10^j + r(n).
Direct calculation (for n>1):
Set m := floor(log_10(n)) + 1), j := floor((sign(n+1 - (8*10^m - 9*9^m + 17)/8) + 1)/2) + m - 1, and determine k and c(i) as follows:
c(1) = n - (8*10^j - 9*9^j + 17)/8, then define successively for i = 1, 2, ...,
c(i+1) = (c(i) mod (10^(j-i+1) - 9^(j-i+1))) - 10^(j-i) while this value is > 0, and set k := i for the last such index for which c(i) > 0 (in any case k is k<=j).
Then a(n) = c(k) mod (10^(j-k+1) - 9^(j-k+1)) + sum_{i=1..k}(floor(c(i)/(10^(j-i+1) - 9^(j-i+1))) + 1)*10^(j-i+1).
Asymptotic behavior:
a(n) = n + O(n^log_10(9)) = n*(1+ O(1/n^0.04575749056...)).
lim a(n)/n = 1 for n -> infinity.
lim inf (a(n) - n)/n^log_10(9) = 9^log_10(9)/8 = 1.017393081085670008926619124438...
lim sup (a(n) - n)/n^log_10(9) = 9/8 = 1.125.
Sums:
Sum_{n >= 2} (-1)^n/a(n) = 0.0693489578....
Sum_{n >= 2} 1/a(n)^2 = 0.0179656962...
Sum_{n >= 2} 1/a(n) diverges, because of a(n) < 10*n.
Sum_{n >= 1} a(n)/n^2 diverges too.
Sum_{n >= 2} 1/a(n)^2 + Sum_{n >= 1} 1/A052382(n)^2 = Pi^2/6.
Generating function:
g(x) = Sum_{k >= 1} g_k(x), where the terms g_k(x) obey the following recurrence relation:
g_k(x) = 10^k*x^b(k) * (1 - 10x^(9d(k)) + 9x^(10d(k)))/((1-x^d(k))(1-x)) + (x*x^b(k) * (1 - 10^(k-1)*x^(10^(k-1)-1) + (10^(k-1)-1)*x^10^(k-1))/((1-x)^2) + g_(k-1)(x)*x^d(k)) * (1-x^(9d(k)))/(1-x^d(k)),
where b(k) := 2 + 10^k - 9^k - (9^k-1)/8,
d(k) := 10^k - 9^k, and g_0(x) = 0.
Explicit representation of g_k(x):
g_k(x) = (10^k*x^b(k)*(1 - 10x^(9d(k)) + 9x^(10d(k)))/(1-x^d(k)) + sum_{j=1..k-1} ((10^j*x^b(j) * (1 - 10x^(9d(j)) + 9x^(10d(j)))/(1-x^d(j)) + x^(b(j)-10^j+1) * (1 - 10^j*x^(10^j-1) + (10^j-1)*x^10^j)/(1-x)) * Product_{i=j+1..k} x^d(i)*(1-x^(9d(i)))/(1-x^d(i)))/(1-x).
A summation term g_k(x) of the g.f. represents all the sequence terms >= 10^k and < 10^(k+1).
Example 1: g_1(x) = 10*x^2*(1 - 10x^9 + 9x^10)/(1-x)^2 represents the g.f. fragment 10x^2 + 20x^3 + ... + 90x^10 and so generates the terms a(2)=10 ... a(10)=90.
Example 2: g_2(x) = 10^2*x^11*(1 - 10x^(9*19) + 9x^(10*19))/((1-x)(1-x^19)) + 10*x^21 * (1 - 10x^9 + 9x^10)/((1-x)^2) * (1-x^(9*19))/(1-x^19)) + x^11*x * (1 - 10x^9 + 9x^10)/((1-x)^2) * (1-x^(9*19))/(1-x^19) represents the g.f. fragment 100x^11 + 101x^12 + ... + 109x^20 + 110x^21 + 120x^22 + ... + 190x^29 + 200x^30 + 201x^31 + ... + 210x^40 + ... + 990x^181 and so generates the terms a(11) = 100 ... a(181) = 990.
(End)
From Hieronymus Fischer, Feb 12 2019: (Start)
The number C(n) of zero-containing numbers <= n (counting function) is given by C(n) = A011540_inverse(n), if n is a zero-containing number, and C(n) = A011540_inverse(A052382(a(n) + 1 - n)), if n is a zerofree number.
Upper bound:
C(n) <= n+1-((9*n+1)^d-1)/8.
Lower bound:
C(n) > n+1-((10*n+1)^d-1)/8
where d = log_10(9) = 0.95424250943932...
(see A324160).
(End)

Extensions

Edited by M. F. Hasler, Oct 11 2015

A324161 Number of zerofree nonnegative integers <= n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 81, 82, 83
Offset: 0

Views

Author

Hieronymus Fischer, Feb 15 2019

Keywords

Comments

This sequence represents the counting function of A052382 (for indices > 0). The offset is set to zero for compatibility with A324160.
For indices 1 < n < 10761677 we have a(n) > A324160(n), for all indices n > 20327615 we have a(n) < A324160(n), i.e., the number of zerofree numbers <= N is smaller than the number of zero containing numbers <= N for sufficiently large N.
There are exactly 20 indices for which a(n) = A324160(n).
The greatest number n = n_max such that a(n) >= pi(n) [the number of primes <= n] is in the range 1.0075615552421*10^45 < n_max < 1.0075622026833*10^45 (see A324155). Thus, for all indices n > n_max, we have a(n) < pi(n). For n = n_max the number of primes is pi(n) = 9818959014098676479127822164411318257546629.
The least number n = n_min such that a(n) <= pi(n) [the number of primes <= n] is in the range 1.0953002073198*10^44 < n_min < 1.0953009588121*10^44 (see A324154). Thus, for all indices n < n_min, we have a(n) > pi(n). For n = n_min the number of primes is pi(n) = 1090995446010964053236424684934590917505180.
Differs from A028904 first at a(100)=90 <> A028904(100)=81. - R. J. Mathar, Mar 03 2020
Differs from A081600 first at a(101)=90 <> A081600(101)=91. - R. J. Mathar, Mar 03 2020

Examples

			a(10) = 9, since there are 9 numbers <= 10 which contain no '0'-digit (1, 2, 3, 4, 5, 6, 7, 8 and 9).
a(100) = 90.
a(10^3) = 819.
a(10^4) = 7380.
a(10^5) = 66429.
a(10^6) = 597870.
a(10^7) = 5380839
a(10^8) = 48427560.
a(10^9) = 435848049.
a(10^10) = 3922632450.
a(10^20) = 13677373641439044900.
a(10^50) = 579799710823512747416018770986323931789870962250 = 5.79799...*10^47.
a(10^100) = 2.9881573748536...68682786424500*10^95.
a(10^1000) = 1.96635515818798306...435874245000*10^954.
		

Crossrefs

Programs

  • Maple
    A324161 := proc(n)
        option remember;
        if n = 0 then
            0;
        else
            convert(convert(n,base,10),set) ;
            if 0 in % then
                procname(n-1) ;
            else
                1+procname(n-1) ;
            end if;
        end if;
    end proc: # R. J. Mathar, Mar 03 2020
  • PARI
    a(n) = sum(k=1, n, vecmin(digits(k)) != 0); \\ Michel Marcus, Mar 20 2019

Formula

With m := floor(log_10(n)); k := Max_{j | j=1..m and (floor(n/10^j) mod 10)*j = 0} = digit position of the leftmost '0' in n counted from the right (starting with 0), k = 0 if there is no '0' digit; b(n,k) := floor(n/10^k)*10^k:
a(n) = n - 1 - Sum_{j=1..m} floor((b(n,k+1)-1)/10^j)*9^(j-1), if k = 0 (valid for n > 9),
a(n) = b(n,k) - 1 - Sum_{j=1..m} floor((b(n,k)-1)/10^j)*9^(j-1), if k > 0 (valid for n > 0),
a(n) = b(n,k) - 1 + ceiling(fract(n/10))*(1-ceiling(k/(m+1))) - Sum_{j=1..m} floor((b(n,k)-1)/10^j)*9^(j-1) (all k, valid for n > 0).
a(n) + A324160(n) = n + 1.
a(A052382(n)) = n.
A052382(a(n)) <= n, for n > 0.
A052382(a(n)) = n, iff n is a zerofree number.
a(10*n + k) >= 9*a(n) + k, k=0..9, equality holds, if n is a zerofree number (i.e., contains no '0'-digit).
a(10*A052382(n) + k) = 9*n + k, k=0..9, n > 0.
Values for special indices:
a(k*(10^n - 1)/9 - j) = k*(9^n - 1)/8 - j, n > 0, k = 1, 2, ... 9, j = 0, 1, 2, ... k.
a(k*10^n - j) = k*9^n + (9^n - 1)/8 - j, n >= 0, k = 1, 2, ... 10, j = 1, 2, ... 10.
a(k*10^n + j) = k*9^n + (9^n - 1)/8 - 1, n > 0, k = 1, 2, ... 10, j = 0, 1, 2, ... (10^(n+1)-1)/9 - 10^n - 1.
With: d := log_10(9) = 0.95424250943932...
Upper bound:
a(n) <= (9*(n+1)^d - 1)/8 - 1,
equality holds for n = 10^k - 1, k >= 0.
Lower bound:
a(n) >= ((9*n + 10)^d - 1)/8 - 1,
equality holds for n = (10^k - 1)/9 - 1, k > 0.
Asymptotic behavior:
a(n) <= (9/8)*n^d*(1 + O(1/n)) - 9/8.
a(n) >= (9^d/8)*n^d*(1 + O(1/n)) - 9/8.
a(n) = O(n^d) = O(n^0.954242509...).
Lower and upper limits:
lim inf a(n)/n^d = 9^d/8 = 1.0173931195971..., for n -> infinity.
lim sup a(n)/n^d = 9/8, for n -> infinity.
From Hieronymus Fischer, Apr 04 2019: (Start)
Formulas for general bases b > 2:
With m := floor(log_b(n)); k := Max_{j | j=1..m and (floor(n/b^j) mod b)*j = 0} = digit position of the leftmost '0' in n counted from the right (starting with 0), k = 0 if there is no '0' digit; b(n,k):= floor(n/b^k)*b^k:
a(n) = n - 1 - Sum_{j=1..m} floor((b(n,k+1)-1)/b^j)*(b-1)^(j-1), if k = 0, valid for n > b-1;
a(n) = b(n,k) - 1 - Sum_{j=1..m} floor((b(n,k)-1)/b^j)*(b-1)^(j-1), if k > 0, valid for n > 0;
a(n) = b(n,k) - 1 + ceiling(fract(n/b))*(1-ceiling(k/(m+1))) - Sum_{j=1..m} floor((b(n,k)-1)/b^j)*(b-1)^(j-1), (all k, valid for n > 0).
Formula for base b = 2: a(n) = floor(log_2(n + 1)).
With d := d(b) := log(b - 1)/log(b).
Upper bound (b = 10 for this sequence):
a(n) <= ((b - 1)*(n + 1)^d - 1)/(b - 2) - 1,
equality holds for n = b^k - 1, k >= 0.
Lower bound (b = 10 for this sequence):
a(n) >= (((b - 1)*n + b)^d - 1)/(b - 2) - 1,
equality holds for n = (b^k - 1)/(b - 1) - 1, k > 0.
Asymptotic behavior (b = 10 for this sequence):
a(n) = O(n^d(b)), for b > 2,
a(n) = O(log(n)), for b = 2.
Lower and upper limits:
lim inf a(n)/n^d = (b - 1)^d/(b - 2), for n -> infinity, for b > 2.
lim sup a(n)/n^d = (b - 1)/(b - 2), for n -> infinity, for b > 2.
In case of b = 2:
lim a(n)/log(n) = 1/log(2), for n -> infinity.
(End)

A324154 Least number N such that the number of primes (<= N) >= the number of the base-n-zerofree numbers (<= N).

Original entry on oeis.org

2, 3, 344251, 33182655683
Offset: 2

Views

Author

Hieronymus Fischer, Feb 22 2019

Keywords

Comments

Further terms:
4.1645275173242*10^15 < a(6) < 4.164601237609*10^15,
1.0163657136*10^22 < a(7) < 1.0163715977928*10^22,
8.4513797224747*10^28 < a(8) < 8.4514006058085*10^28,
1.959502408617*10^36 < a(9) < 1.9595048275153*10^36,
1.0953002073198*10^44 < a(10) < 1.0953009588121*10^44,
1.3480809599483*10^53 < a(11) < 1.3480814844466*10^53,
3.540916347013*10^61 < a(12) < 3.5409172310273*10^61,
2.080341784427*10^71 < a(13) < 2.0803421176765*10^71,
2.4843833393543*10^81 < a(14) < 2.4843836067277*10^81,
5.6615671922884*10^91 < a(15) < 5.6615676172791*10^91,
2.1556069128839*10^148 < a(20) < 2.1556069510899*10^148.
a(n) is always a prime number.
For n > 2, all terms are odd.
All terms a(n) are zero-containing numbers (in base n), a(n) - 1 is also a zero-containing number (in base n).
The numbers between p := max( k < a(n) | k is prime) and a(n) + 1 are zero-containing numbers, i.e., a(n) + 1 - j is a zero-containing number for 0 < j < a(n) + 1 - p.
From the equality A324164(5) = A324165(5) we can conclude that a(5) and A324155(5) + 1 are proximate primes. Same is true for a(11): a(11) and A324155(11) + 1 are proximate primes.
Conjecture: a(n) can be represented in the form a(n) = k*n^m + j, where j < (n^(m+1)-1)/(n-1) - n^m, and m > 1, 0 < k < n.

Examples

			a(2) = 2, since pi(1) = 0 < 1 = numOfZerofreeNum_2(1), pi(2) = 1 >= 1 = numOfZerofreeNum_2(2), where numOfZerofreeNum_2(m) is the number of base-2-zerofree numbers <= m and pi(m) = number of primes <= m. The first base-2-zerofree numbers are 1 = 1_2, 3 = 11_2, 7 = 111_2, ...
a(3) = 3, since pi(1) = 0 < 1 = numOfZerofreeNum_3(1), pi(2) = 1 < 2 = numOfZerofreeNum_3(2), pi(3) = 2 >= 2 = numOfZerofreeNum_3(3), where numOfZerofreeNum_3(m) is the number of base-3-zerofree numbers <= m and pi(m) = number of primes <= m. The first base-3-zerofree numbers are 1 = 1_3, 2 = 2_3, 4 = 11_3, 5 = 12_3, 7 = 21_3, ...
		

Crossrefs

Programs

  • PARI
    a(n) = {my(k = 1, nbp = 0, nzf = 1); while(nbp < nzf, k++; if (isprime(k), nbp++); if (vecmin(digits(k, n)), nzf++);); k;} \\ Michel Marcus, Mar 20 2019

Formula

a(n) = min(k | pi(k) >= numOfZerofreeNum_n(k)), where numOfZerofreeNum_n(k) is the number of base-n-zerofree numbers <= k ((see A324161 for general formulas regarding numOfZerofreeNum_n(k))).
a(n) <= A324155(n) - 1.
Estimation for the n-th term (n > 2):
a(n) < e*(p*log(p*log((e/(e-1))*p*log(p))))^(1/(1-d)),
a(n) > e^1.1*(q*log(q*log(q*log(q))))^(1/(1-d)),
where p := (n-1)/((n-2)*(1-d))*e^(-(1-d)), q := (n-1)^d/((n-2)*(1-d))*e^(-1.1*(1-d)), d := d(n) := log(n-1)/log(n).
Also, but more imprecise:
a(n) > e^1.1*(q*log(q))^(1/(1-d)),
a(n) > (n/(n-1))*((n-1)*log(n)*log(n*log(n)))^((n-1/2))*log(n)).
Asymptotic behavior:
a(n) = O(n*((e/(e-1))*n*log(n)*log(n*log(n)))^(n*log(n))).
a(n) = O(n*(((e+1)/(e-1))*n*log(n)^2)^(n*log(n))).

A324155 Greatest number N such that the number of primes (<= N) <= the number of base-n-zerofree numbers (<= N).

Original entry on oeis.org

4, 498, 1139556, 33182655688
Offset: 2

Views

Author

Hieronymus Fischer, Feb 22 2019

Keywords

Comments

Further terms:
14670238462896430 < a(6) < 14670469667698570;
1.88655928870547380*10^22 < a(7) < 1.8865698003644555*10^22;
1.5845871199286*10^29 < a(8) < 1.5845909238805*10^29;
3.7023896360635*10^36 < a(9) < 3.7023941021398*10^36;
1.0075615552422*10^45 < a(10) < 1.0075622026833*10^45;
1.3480809599483*10^53 < a(11) < 1.3480814844466*10^53;
3.9618565460983*10^62 < a(12) < 3.9618574860993*10^62;
7.8648507615953*10^71 < a(13) < 7.864851991241*10^71;
4.7945106758325*10^81 < a(14) < 4.7945111864185*10^81;
1.0953005932169*10^92 < a(15) < 1.0953006746693*10^92;
8.3149001821943*10^148 < a(20) < 8.3149003278317*10^148.
All terms are even, since a(n) + 1 is always an odd prime number.
The numbers a(n) + 1 and a(n) + 2 are zero containing numbers (in base n).
The numbers between a(n) and p := min( k > a(n) + 1 | k is prime) are zero containing numbers, i.e., a(n) + j is a zero containing number for 0 < j < p - a(n).
For numbers m > a(10) = 1.00756...*10^45, we have pi(m) > A324161(m) [= number of zerofree numbers <= m]; in general, the ratio A324161(m) to pi(m) is O(log(n)*n^d), where d := 1 - 1/(1 - log_10(9)) = -0.0457..., and thus tends to 0 for m --> infinity. Consequently, the share of primes <= m which have no '0'-digit become significantly smaller as m rises beyond that bound a(10). For m = 10^100, the share is not greater than 0.000688, for m = 10^1000, the share cannot exceed 4.52757*10^(-43). Conversely, the share of primes which contain a '0'-digit tends to 1 as m grows to infinity (cf. A011540).
Conjecture: a(n) can be represented in the form a(n) = k*n^m + j, where j < (n^(m+1)-1)/(n-1) - n^m, and m > 1, 0 < k < n.

Examples

			a(2) = 4, since pi(1) = 0 <= 1 = numOfZerofreeNum_2(1), pi(2) = 1 <= 1 = numOfZerofreeNum_2(2), pi(3) = 2 <= 2 = numOfZerofreeNum_2(3), pi(4) = 2 <= 2 = numOfZerofreeNum_2(3), and pi(m) > numOfZerofreeNum_2(m) for m > 4, where numOfZerofreeNum_2(m) is the number of base-2-zerofree numbers <= m and pi(m) = number of primes <= m. The first base-2-zerofree numbers are 1 = 1_2, 3 = 11_2, 7 = 111_2, ...
		

Crossrefs

Formula

a(n) = max(k | pi(k) <= numOfZerofreeNum_n(k)), where numOfZerofreeNum_n(k) is the number of base-n zerofree numbers <= k ((see A324161 for general formulas regarding numOfZerofreeNum _n(k))).
a(n) >= A324154(n) + 1.
Estimate of the n-th term (n > 2):
a(n) < e*(p*log(p*log((e/(e-1))*p*log(p))))^(1/(1-d)),
a(n) > e^1.1*(q*log(q*log(q*log(q))))^(1/(1-d)),
where p := (n-1)/((n-2)*(1-d(n)))*e^(-(1-d)), q := (n-1)^d/((n-2)*(1-d(n)))*e^(-1.1*(1-d)), d := d(n) := log(n-1)/log(n).
Also, but more imprecise:
a(n) < e*((e/(e-1))*p*log(p))^(1/(1-d)),
a(n) < e*((e/(e-1))*p*log(p))^((n-1/2)*log(n)),
a(n) < n*((e/(e-1))*n*log(n)*log(n*log(n)))^((n-1/2)*log(n)), n > 3.
Asymptotic behavior:
a(n) = O(n*((e/(e-1))*n*log(n)*log(n*log(n)))^(n*log(n))).
a(n) = O(n*((e+1)/(e-1)*n*log(n)^2)^(n*log(n))).

A329624 Number of iterations of A329623 for starting value n before a repeated value appears, or -1 if this never happens.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10
Offset: 1

Views

Author

Scott R. Shannon, Nov 19 2019

Keywords

Comments

This sequence gives the number of iterations of A329623 for start value n before a repeated value first appears. Unlike the "ghost iteration" of A329200 the only fixed points are the single digits 0 to 9. See A328865 for the first repeating value.
Due to A329623(n) being significantly larger than n for some values of n, the iterative sequence can grow to infinity for some n. The first value to do so is n = 1373. This appears due to the occurrence of the digit string '62637' at the end of the term of the third iteration. These five digits reappear every second iteration at the end of the term, but with more and more digits preceding it. A329917 lists other divergent n values.
The smallest value, for n >= 10, which acts as an end point before repeating is 9, which is the final value for many starting values.
The digit string '8091' forms the basis of a very long convergent series for some values of n. The digit string consisting of an arbitrary number of copies of '80' followed by '91' will eventually converge to 8091, then 891, then 91, which finally converges in ten more iterations. We can thus form a number of arbitrary length using this rule which is guaranteed to converge. This sequence appears naturally with the starting value n = 139100 which converges to 9 after 136 iterations after reaching a term with 72 digits after 20 iterations. See the linked file below.
From M. F. Hasler, Dec 03 2019: (Start)
It seems the a(n) = -1 are conjectural, i.e., we have no proof that the terms for which the trajectory seems to "explode" do not eventually end up in a cycle. For example, the 8th iterate of 1373 is 5218725017016262626273. If the 2nd digit is changed from 2 to 0, then the further iterates appear to explode up to a length of 157 bits, but finally end up in a 2-cycle of 41-digit numbers (26...26273, 62...62637).
The "repeating values" are members of cycles, listed in A328142. Only fixed points 1, ..., 9 and 4*(10^k-1)/9 + 11, k >=3, and 6 infinite families of 2-cycles are known.
(End)
The first escape value is a(1373) = -1 (without proof). - Georg Fischer, Jul 16 2020

Examples

			a(1) = 1 as A329623(1) = 1, so a repeating value occurs after 1 iteration.
a(10) = 2 as A329623(10) = 9 and A329623(9) = 9, so a repeating value occurs after 2 iterations.
a(128) = 3, as A329623(128) = 182, A329623(182) = 728, A329623(728) = 182, so a repeating value occurs after 3 iterations.
		

Crossrefs

Sequences A324160, A226233, A179051, A140438, A132272 are unrelated; they begin with the same numbers as this sequence but differ after a(110) = 10, which ends the pattern of incrementing numbers, 2 through 11, repeated ten times.

Programs

  • PARI
    A329624(n,L=n^10,U=[n])=-!for(i=1,oo,setsearch(U,n=A329623(n))&&return(i); nM. F. Hasler, Dec 02 2019

A306195 Least integer N > 1 such that the number of base-n-zero containing numbers [<= N] >= the number of base-n-zerofree numbers [<= N].

Original entry on oeis.org

2, 3, 77, 679, 2809, 18659, 274511, 1123471, 10761677, 222222219, 1329025059, 11257702583, 298693399003, 8722140365427, 18535191127229, 600479950316063, 21047228319925113, 44095690303774235, 1686791892208310919
Offset: 2

Views

Author

Hieronymus Fischer, Mar 26 2019

Keywords

Comments

For numbers 1 < k < a(n) the number of base-n-zero containing numbers <= k is always smaller than the number of base-n-zerofree numbers <= k. The boundary a(n) is rapidly growing as the base n rises (see formula section).
For numbers k >= a(n) the number of base-n-zero containing numbers <= k may be greater or smaller than the number of base-n-zerofree numbers <= k, also both numbers may be equal. Example 1: for base n = 2 we have numOfZeroNum_2(2) > numOfZerofreeNum_2(2), numOfZeroNum_2(3) = numOfZerofreeNum_2(3), but numOfZeroNum_2(k) > numOfZerofreeNum_2(k) for k > 3. Example 2: for base n = 3 we have numOfZeroNum_3(k) = numOfZerofreeNum_3(k), for k = 1, 3, 11, 13, 15, 19, 23, 25, 27, but numOfZeroNum_2(k) < numOfZerofreeNum_2(k) for k = 2, 4..10, 14, 16, 17, 18, 26, and numOfZeroNum_2(k) > numOfZerofreeNum_2(k) for k = 12, 20, 21, 22, 24 and for k > 27.
The number of indices k = k(n) for which numOfZeroNum_n(k) = numOfZerofreeNum_n(k) forms the sequence 2, 9, 9, 1, 27, 20, 1, 68, 20, 1, 103, 40, ... (starting with n = 2).
All terms a(n) are zero containing numbers (in base n).
All terms are odd for n > 2. Proof: The definition implies numOfZeroNum_n(a(n)) = numOfZerofreeNum_n(a(n)), for n > 2. In general, we have numOfZeroNum_n(k) + numOfZerofreeNum_n(k) = k + 1. It follows that a(n) = 2*numOfZeroNum_n(a(n)) - 1.
a(n) <= A306442(n), equality holds for n = 5, 8, 11, 14, 15, 17, 18, 21, 24, 27, 28, 30, 31, 34, 37, 40, 41, 43, 44, 47, 50, 51, 53, 54, 56, 57, 60, 63, 64, 66, 67, 69, 70, 73, 76, 77, 79, 80, 82, 83, 86, 89, 90, 92, 93, 96, 99, ... For significantly large n, equality holds true for those bases which satisfy fract((n-1/2)*log(2) + O(1/n)) < 1/2 + O(1/n). This is true for infinitely many indices n. Let e(n) be the number of bases m <= n for which a(m) = A306442(m), then lim_{n->infinity} e(n)/n = 1/2, i.e., for large n, on average, every second term of this sequence is also a term of A306442.

Examples

			a(2) = 2, since numOfZeroNum_2(2) [= the number of base-2-zero containing numbers <= 2] is greater than or equal to numOfZerofreeNum_2(2) [the number of base-2-zerofree numbers <= 2], i.e., numOfZeroNum_2(2) = 2 >= 1 = numOfZerofreeNum_2(2), and indices < 2 are out of focus by definition. Hint: the zero numbers <= 2 in base 2 are 0 = 0_2 and 2 = 10_2, the only zerofree numbers <= 2 in base 2 is 1 = 1_2.
a(3) = 3, since numOfZeroNum_3(3) = 2 <= 2 = numOfZerofreeNum_3(3) but numOfZeroNum_3(k) > numOfZerofreeNum_3(k) for k > 3. Hint: the zero numbers <= 3 in base 3 are 0_3 = 0, and 10_3 = 3, the zerofree numbers <= 3 in base 3 are 1_3 = 1 and 2_3 = 2.
		

Crossrefs

Formula

With numOfZeroNum_n(k) [= the number of base-n-zero containing numbers <= k] and numOfZerofreeNum_n(k) [the number of base-n-zerofree numbers <= k] and d := log(n-1)/log(n):
a(n) = min(k > 1 | numOfZeroNum_n(k) >= numOfZerofreeNum_n(k)).
Because of d = d(n) < 1, numOfZeroNum_n(k) = k*(1 + O(k^(d-1)) and numOfZerofreeNum _n(k) = O(k^d) this minimum always exists (for n > 2).
For all bases n >= 2: numOfZeroNum_n(1) = numOfZerofreeNum_n(1).
See A324160 and A324161 for general formulas regarding numOfZeroNum_n(k) and numOfZerofreeNum_n(k).
a(n) = min(k > 1 | numOfZeroNum_n(k) = (n + 1)/2).
a(n) = min(k > 1 | numOfZerofreeNum_n(k) = (n + 1)/2).
Estimate of the n-th term (n > 3): a(n) > (2*(n-1)^d/(n-2))^(1/(1-d)), where d := log(n-1)/log(n).
Also, but less accurate,
a(n) > 2^((n-1/2)*log(n).
a(n) > 2^((n-1/2)*log(n)*e^((11*log(n)+12)/(12*n).
a(n) <= A306442(n), for further upper bound estimations see A306442.
Asymptotic behavior:
a(n) = O(n*2^((n-1/2)*log(n))).
Lower and upper limits:
lim sup a(n)/(n*2^((n-1/2)*log(n))) = 1, for n --> infinity.
lim inf a(n)/(2^((n-1/2)*log(n)) = 1, for n --> infinity.

A306442 Greatest integer N such that the number of base-n-zero containing numbers [<= N] <= the number of base-n-zerofree numbers [<= N].

Original entry on oeis.org

3, 27, 131, 679, 7809, 34211, 274511, 4793487, 20327615, 222222219, 5187484917, 31896823991, 298693399003, 8722140365427, 70433726283479, 600479950316063, 21047228319925113, 252325338960485915, 3284805263774079161, 68985263157894736839
Offset: 2

Views

Author

Hieronymus Fischer, Mar 26 2019

Keywords

Comments

For numbers k > a(n) the number of base-n-zero containing numbers <= k is always greater than the number of base-n-zerofree numbers <= k. This boundary is rapidly growing as the base n rises (see formula section).
The quotient numOfZerofreeNum_n(k)/numOfZeroNum_n(k) tends to 0 for k --> infinity and each fixed base n. Formally, numOfZerofreeNum_n(k)/numOfZeroNum_n(k) = O(k^c) with a constant c := c(n) = log(n-1)/(log(n) - 1 < 0, if n > 2. For n = 2 we have numOfZerofreeNum_2(k) = floor(log_2(k+1)), numOfZeroNum_2(k) = (k + 1 - floor(log_2(k+1)), thus numOfZerofreeNum_2(k)/ numOfZeroNum_2(k) = (k + 1)^(-1) * floor(log_2(k+1)) / (1 - floor(log_2(k+1))/(k+1)) = O(log(k)/k). Example: n = 3, numOfZerofreeNum_3(k)/numOfZeroNum_3(k) = O(k^(-0.369070...)); example: n = 10, numOfZerofreeNum _10(k)/numOfZeroNum_10(k) = O(k^(-0.045757490...)).
The first term a(2) = 3 = 11_2 is the only one which is a zerofree (i.e., a zeroless) number (in base 2), all the other terms a(n) are zero containing numbers (in base n). In any case, a(n) + 1 is always a zero containing number (in base n).
All terms are odd. Proof: The definition implies numOfZeroNum_n(a(n)) = numOfZerofreeNum_n(a(n)). In general, we have numOfZeroNum_n(k) + numOfZerofreeNum_n(k) = k + 1. It follows a(n) = 2*numOfZeroNum_n(a(n)) - 1.
a(n) >= A306195(n), equality holds for n = 5, 8, 11, 14, 15, 17, 18, 21, 24, 27, 28, 30, 31, 34, 37, 40, 41, 43, 44, 47, 50, 51, 53, 54, 56, 57, 60, 63, 64, 66, 67, 69, 70, 73, 76, 77, 79, 80, 82, 83, 86, 89, 90, 92, 93, 96, 99, .... For significantly large n, equality holds true for those bases which satisfy fract((n-1/2)*log(2) + O(1/n)) < 1/2 + O(1/n). This is true for infinitely many indices n. Let e(n) be the number of bases m <= n for which a(m) = A306195(m), then lim_{n->infinity} e(n)/n > 1/2, i.e., for large n, on average, at least every second term of this sequence is also a term of A306195.

Examples

			a(2) = 3, since numOfZeroNum_2(3) [= the number of zero numbers <= 3, in base 2] is less than or equal to numOfZerofreeNum_2(3) [the number of zerofree numbers <= 3, in base 2], i.e., numOfZeroNum_2(3) = 2 <= 2 = numOfZerofreeNum_2(3), but numOfZeroNum_2(k) > numOfZerofreeNum_2(k) for k > 3. Hint: the zero numbers <= 3 in base 2 are 0 = 0_2 and 2 = 10_2, the zerofree numbers <= 3 in base 2 are 1 = 1_2 and 3 = 11_2.
a(3) = 27, since numOfZeroNum_3(27) = 14 <= 14 = numOfZerofreeNum_3(27) but numOfZeroNum_3(k) > numOfZerofreeNum_3(k) for k > 27. Hint: the zero numbers <= 27 in base 3 are 0_3, 10_3, 20_3, 100_3, 101_3, 102_3, 110_3 120_3, 200_3, 201_3, 202_3, 210_3, 220_3 and 1000_3 = 27, the zerofree numbers <= 27 in base 3 are 1_3, 2_3, 11_3, 12_3, 21_3, 22_3, 111_3, 112_3, 121_3, 122_3, 211_3, 212_3, 221_3 and 222_3 = 26.
		

Crossrefs

Formula

With numOfZeroNum_n(k) [= the number of base-n-zero containing numbers <= k] and numOfZerofreeNum_n(k) [the number of base-n-zerofree numbers <= k] and d := log(n-1)/log(n):
a(n) = max(k | numOfZeroNum_n(k) <= numOfZerofreeNum_n(k)).
Because of d = d(n) < 1, numOfZeroNum_n(k) = k*(1 + O(k^(d-1)), numOfZerofreeNum _n(k) = O(k^d) and numOfZeroNum_n(1) = 1 = numOfZerofreeNum_n(1) this maximum always exists (for n > 2). This is also true for the case n = 2, since numOfZeroNum_2(k) = k*(1 + O(log(k)/k)) and numOfZerofreeNum_2(k) = O(log(k)).
a(n) = max(k > 1 | numOfZeroNum_n(k) = (n + 1)/2).
a(n) = max(k > 1 | numOfZerofreeNum _n(k) = (n + 1)/2).
See A324160 and A324161 for general formulas regarding numOfZeroNum_n(k) and numOfZerofreeNum_n(k).
Estimate of the n-th term (n > 2):
a(n) < (2*(n-1)/(n-2))^(1/(1-d)) - 1,
where d := log(n-1)/log(n).
Also, but less accurate,
a(n) < (2*(n-1)/(n-2))^((n-1/2)*log(n)), n > 2,
a(n) < n*2^(n*log(n)), n > 1.
a(n) >= A306195(n), for further lower bound estimations see A306195.
Asymptotic behavior:
a(n) = O(n*2^((n-1/2)*log(n))).
Lower and upper limits:
lim sup a(n)/(n*2^((n-1/2)*log(n))) = 1, for n --> infinity.
lim inf a(n)/(log(n)*2^((n-1/2)*log(n)) = e, for n --> infinity.

A306521 Least integer N > 2 such that the number of primes (<=N) <= the number of base-n-zero containing numbers (<=N).

Original entry on oeis.org

3, 3, 4, 28, 42, 104, 136, 329, 510, 856, 1449, 2212, 2782, 3434, 4188, 5042, 6001, 7082, 8276, 9604, 11062, 12666, 14405, 31651, 35694, 40061, 66427, 73966, 108764, 149756, 197516, 288280, 354924, 515538, 701002, 963687, 1318399, 1840377
Offset: 2

Views

Author

Hieronymus Fischer, Mar 29 2019

Keywords

Comments

a(n) <= A306526(n), equality holds for n = 2, 14, 15, 16, 17, 18, 19, 20, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52 (but a(n) < A306526(n) for all other indices n up to 82). For sufficiently large n, equality holds true for those bases n which satisfy 1/2 <= fract(sqrt(n/log(n)) + O(sqrt(log(n)/n))) < 3/4. This is true for infinitely many further indices, at least for all bases n = ceiling(x), where x is a solution of x/log(x) = k-th triangular number + 1/4, k > 1. For k = 2..10 the corresponding bases are n = 19, 48, 92, 152, 230, 326, 440, 574, 727. Let e(n) be the number of bases m <= n for which a(m) = A306526(m), then lim_{n->infinity} e(n)/n >= 1/4. Conjecture: lim_{n->infinity} e(n)/n = 1/4.

Examples

			a(2) = 3, since pi(3) = 2 <= 2 = numOfZeroNum_2(3), where numOfZeroNum_2(m) is the number of base-2-zero containing numbers <= m and pi(m) = number of primes <= m. The first base-2-zero containing numbers are 0 = 0_2, 2 = 10_2, 4 = 100_2, ... (Hint: numbers <= 2 are out of scope for self-evident reasons).
a(3) = 3, since pi(3) = 2 <= 2 = numOfZeroNum_3(3), where numOfZeroNum_3(m) is the number of base-3-zero containing numbers <= m and pi(m) = number of primes <= m. The first base-3-zero containing numbers are 0 = 0_2, 3 = 10_3, 6 = 20_3, 9 = 100_3, 10 = 101_3, 11 = 102_3, 12 = 120_3, ...
a(4) = 4, since pi(3) = 2 > 1 = numOfZeroNum_4(3), pi(4) = 2 <= 2 = numOfZeroNum_4(4), where numOfZeroNum_4(m) is the number of base-4-zero containing numbers <= m and pi(m) = number of primes <= m. The first base-4-zero containing numbers are 0 = 0_2, 4 = 10_4, 8 = 20_4, ...
		

Crossrefs

Programs

  • PARI
    cz(m,n) = vecmin(digits(m, n))==0;
    a(n) = {my(m=2, nbz=1+sum(k=1, 2, cz(k,n)), pmp=primepi(2)); for (m=3, oo, if (isprime(m), pmp++); if (cz(m,n), nbz++); if (pmp <= nbz, return (m)););} \\ Michel Marcus, Jun 10 2019

Formula

With numOfZeroNum_n(k) [= the number of base-n-zero containing numbers <= k] and pi(k) [= the number of primes <= k] and d := log(n-1)/log(n):
a(n) = min(k > 2 | pi(k) <= numOfZeroNum_n(k)). Because of d = d(n) < 1, numOfZeroNum_n(k) = k*(1 + O(k^(d-1)), pi(k) = k/log(k)*(1+o(1)), and pi(3) = 2 >= 2 = numOfZeroNum_n(3), this minimum always exists (for n > 2). The case n = 2 is obvious. See A324160 regarding general formulas for numOfZeroNum_n(k).
Estimate of the n-th term:
a(n) > e*(1 + c1/c2*(1 + sqrt(1 + c2*c3/c1^2)))^(1/(1-d)), for n > 6,
where d := log(n-1)/log(n),
c0 := e^(1-d),
c1 := (n-1)^d/(n-2) - 1/e^(sqrt(n*log(n))) - d*c0,
c2 := (n-1)^d/(n-2) - 1/e^(sqrt(n*log(n))) + (1 - 1/sqrt(n*log(n)))*c0,
c3 := 2*(1-d)*c0.
Also, but less accurate, for n > 6,
a(n) > e*(1 + 1/(sqrt(n*log(n)) - 2))^(1/(1-d)).
a(n) > e*(1 + 1/(sqrt(n*log(n)) - 2))^((n-1/2)*log(n)).
a(n) <= A306526(n), see A306526 for further upper bound estimations.
Asymptotic behavior:
a(n) = O(sqrt(n)*e^sqrt(n*log(n))).
lim sup a(n)/e^(sqrt(n*log(n))+(log(n)+1)/2) = 1, for n --> infinity.
lim inf a(n)/e^(sqrt(n*log(n))+1/2) = 1, for n --> infinity.

A306526 a(n) = greatest integer N such that (number of primes <= N) >= (number of numbers <= N that contain a zero in base n).

Original entry on oeis.org

3, 9, 31, 50, 107, 147, 257, 406, 701, 1091, 1731, 2213, 2782, 3434, 4188, 5042, 6001, 7082, 8276, 18543, 21383, 24521, 27932, 46917, 52924, 59437, 88034, 122055, 162060, 208619, 262334, 359458, 471733, 600588, 839889, 1114547, 1481920, 2076185
Offset: 2

Views

Author

Hieronymus Fischer, Mar 29 2019

Keywords

Comments

a(n) >= A306521(n), equality holds for n = 2, 14, 15, 16, 17, 18, 19, 20, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52 (but a(n) > A306521(n) for all other indices n up to 82). For sufficiently large n, equality holds true for those bases n which satisfy 1/2 <= fract(sqrt(n/log(n)) + O(sqrt(log(n)/n))) < 3/4. This is true for infinitely many indices, at least for all bases n = ceiling(x), where x is a solution of x/log(x) = k-th triangular number + 1/4, k > 1. For k = 2..10 the corresponding bases are n = 19, 48, 92, 152, 230, 326, 440, 574, 727. Let e(n) be the number of bases m <= n for which a(m) = A306521(m), then lim_{n->infinity} e(n)/n >= 1/4. Conjecture: lim_{n->infinity} e(n)/n = 1/4.

Examples

			a(2) = 3, since pi(3) = 2 >= 2 = numOfZeroNum_2(3), and pi(k) < numOfZeroNum_2(k) for all k > 3, where numOfZeroNum_2(m) is the number of base-2-zero-containing-numbers <= m and pi(m) = number of primes <= m. The first base-2-zero-containing-numbers are 0 = 0_2, 2 = 10_2, 4 = 100_2, ...
a(3) = 9, since pi(9) = 4 >= 4 = numOfZeroNum_3(9), and pi(k) < numOfZeroNum_3(k) for all k > 9, where numOfZeroNum_3(m) is the number of base-3-zero-containing-numbers <= m and pi(m) = number of primes <= m. The first base-3-zero-containing-numbers are 0 = 0_2, 3 = 10_3, 6 = 20_3, 9 = 100_3, 10 = 101_3, 11 = 102_3, 12 = 120_3, ...
		

Crossrefs

Programs

  • PARI
    lbz(n, b) = my(d = log(b - 1)/log(b)); n + 2 - ((b-1)*(n+1)^d - 1)/(b-2);
    ubp(n) = n/(log(n) - 4);
    f(b) = if (b==2, 10, ceil(solve(x=100, 10^100, lbz(x, b) - ubp(x))));
    cz(m, n) = vecmin(digits(m, n))==0;
    getpos(vdiff) = {forstep (k=#vdiff, 1, -1, if (vdiff[k]  == 0, return (k)););}
    a(n) = {my(ub = f(n), vdiff = vector(ub), nbz = 1, pmp = 0); for (m=1, ub, if (cz(m, n), nbz++); if (isprime(m), pmp++); vdiff[m] = nbz - pmp;); getpos(vdiff);} \\ Michel Marcus, Jun 14 2019

Formula

With numOfZeroNum_n(k) [= the number of base-n-zero containing numbers <= k] and pi(k) [= the number of primes <= k] and d := log(n-1)/log(n):
a(n) = max(k | pi(k) >= numOfZeroNum_n(k)). Because of d = d(n) < 1, numOfZeroNum_n(k) = k*(1 + O(k^(d-1)), pi(k) = k/log(k)*(1+o(1)), and pi(3) = 2 >= 2 = numOfZeroNum_n(3) this maximum always exists (for n > 2). The case n = 2 is obvious. See A324160 regarding general formulas for numOfZeroNum_n(k).
Estimation for the n-th term (n > 2):
a(n) < e^alpha*(1 + c1/c2*(1 + sqrt(1 + c2*c3/c1^2)))^(1/(1-d)),
where d := log(n-1)/log(n), alpha := 1.1,
c0 := e^(alpha*(1-d)),
c1 := (n-1)/(n-2) - d*c0,
c2 := (n-1)/(n-2) + (1 - 1/sqrt(n*log(n)))*c0,
c3 := 2*(1-d)*c0.
Also, but less accurate, n > 2,
a(n) < e^alpha*(1 + (1 + sqrt(1 + 4*(n-2)^2/(n*log(n))))/(1 + (n-2)*(2-1/sqrt(n*log(n)))))^((n-1/2)*log(n)).
a(n) >= A306521(n), see A306521 for further lower bound estimations.
Asymptotic behavior:
a(n) = O(sqrt(n)*e^sqrt(n*log(n))).
lim sup a(n)/e^(sqrt(n*log(n))+(log(n)+1)/2) = 1, for n --> infinity.
lim inf a(n)/e^(sqrt(n*log(n))+log(log(n))/2+1) = 1, for n --> infinity.

A324164 Number of primes <= A324154(n).

Original entry on oeis.org

1, 2, 29523, 1431655764, 119209289550780, 204698073815493849906, 1288498953284574087356182400, 23736214210444926301853697505006152, 1090995446010964053236424684934590917505180, 1111111111111111111111111111111111111111111111111110
Offset: 2

Views

Author

Hieronymus Fischer, Feb 22 2019

Keywords

Comments

Also the number of zerofree numbers <= A324154(n).
Expressed in base n - 1 and starting with n = 3, the sequence is 10, 1111111110, 1111111111111110, 111111111111111111110, 111111111111111111111111110, 111111111111111111111111111111110, 111111111111111111111111111111111111110, 111111111111111111111111111111111111111111110, 1111111111111111111111111111111111111111111111111110, ....
Ostensibly, the reason for that is the calculation formula (see Formula section) for the number of zerofree numbers <= x^m + y, with y < (x^(m+1)-1)/(x-1) - x^m. But the deeper reason is the definition of sequence A324154. Each term A324154(n) marks a point of intersection between the curve numOfZerofreeNum_n(x) [the number of base-n zerofree numbers <= x] and the curve pi(x) [the number of prime numbers <= x]. Since numOfZerofreeNum_n(x) doesn't change for relatively large intervals at x = k*n^m (approx. a portion of > 1/(k*n)), but grows similar to pi(x) for regions outside, it is likely, that the point of intersection lies between x = k*n^m and x = n^m*(k + 1/n + 1/n^2 + 1/n^3 + ... + 1/n^m). The chance is maximal for k = 1, since the density of primes becomes smaller for greater x.

Examples

			a(2) = 1, since there is only one prime <= A324154(2) = 2.
a(3) = 2, since there are 2 primes <= A324154(3) = 3.
		

Crossrefs

Formula

a(n) = pi(A324154(n)).
a(n) = numOfZerofreeNum_n(A324154(n)), where numOfZerofreeNum_n(x) is the number of base-n zerofree numbers <= x (cf. A324161).
a(n) = k*(n-1)^m + ((n-1)^m - 1)/(n-2) - 1,
where m = floor(log_n(A324154(n))), k = floor(A324154(n)/n^m), and provided A324154(n) - k*n^m < (n^(m+1)-1)/(n-1) - n^m.
With d := log(n-1)/log(n):
a(n) <= ((n - 1)*(A324154(n) + 1)^d - 1)/(n - 2) - 1,
a(n) >= (((n - 1)*A324154(n) + n)^d - 1)/(n - 2) - 1.
a(n) < A324154(n) / (log(A324154(n)) - 1.1), for n > 3.
a(n) > A324154(n) / (log(A324154(n)) - 1), for n > 3.
Showing 1-10 of 12 results. Next