1 Introduction
1.1 Motivation and background
Since recently there has been a lot of interest in arithmetic properties of integers with various digit restrictions in a given integer base g. This includes the work of Bourgain [Reference BourgainBou13, Reference BourgainBou15] and Swaenepoel [Reference SwaenepoelSwa20] on primes with prescribed digits on a positive proportion of positions in their digital expansion, the resolution of the Gelfond conjecture by Mauduit and Rivat [Reference MaynardMR10], and the results of Maynard [Reference MaynardMay19, Reference MengMay22] on primes with missing digits (see also [Reference Bugeaud and KanekoBK18, Reference BugeaudBug18, Reference ColCol09, Reference Dietmann, Elsholtz and ShparlinskiDES17, Reference Drmota, Mauduit and RivatDMR20, Reference KarwatowskiKar22, Reference NaslundNas15, Reference PrattPratt20] and the references therein).
Prime divisors of integers with very few nonzero g-ary digits have been studied in [Reference BourgainBou05, Reference Chang, Kerr and ShparlinskiCKS18, Reference ShparlinskiShp08].
A variety of results on primitive roots and quadratic nonresidues modulo a prime p, which satisfy various digit restrictions can be found in the series of work [Reference Dietmann, Elsholtz and ShparlinskiDES13a, Reference Dietmann, Elsholtz and ShparlinskiDES13b, Reference Dietmann, Elsholtz and ShparlinskiDES17].
Furthermore, Mauduit and Rivat [Reference Mauduit and RivatMR09] and Maynard [Reference MengMay22] have also studied values of integral polynomials with various digital restrictions.
We also note that special integers with restricted digits appear in the context of cryptography [Reference GranvilleGS08, Reference MertensMeng13, Reference ShparlinskiShp06].
Here, we consider some digital problems for smooth integers. We recall that by a result of Bugeaud and Kaneko [Reference Bugeaud and KanekoBK18, Theorem 1.1] any integer N with at most $k\geqslant 3$ nonzero digits in any fixed basis $g\geqslant 2$ not dividing N has a prime divisor $p\mid N$ with
as $N \rightarrow \infty $ (see also [Reference BugeaudBug21]). The proof of (1.1) uses some classical methods of Diophantine analysis, such as the bounds of linear forms in logarithms. Our technique is different and shows that there are many both reasonably smooth and sparse binary integers.
1.2 Smooth sparse integers
We recall that an integer s is called y-smooth if it has no prime divisors $p> y$ (see [Reference Graham and ShparlinskiGra08, Reference Hildebrand and TenenbaumHT86] for some background).
For a fixed absolute constant $\zeta \geqslant 1$ , given a real number $A>\zeta ^3$ we define
and define $\vartheta _0(A)<1/2$ by the equation
where $H(\rho )$ is the binary entropy function defined by
In particular, notice that $\vartheta _0(A)\rightarrow 1/2$ as $A\rightarrow \infty $ .
We are interested in the existence of smooth integers with only few nonzero binary digits. Clearly, this question makes sense only for odd integers as otherwise powers of $2$ give a perfect solution.
Theorem 1.1 There is an absolute constant $\zeta \geqslant 1$ such that for $A>\zeta ^3$ the following holds: For any $\vartheta < \vartheta _0(A)$ and sufficiently large n, there exists an odd $n^A$ -smooth n-bit integer with at least
zeros in its binary expansion.
The proof of Theorem 1.1 is based on a refinement of the argument of [Reference ShparlinskiShp06, Theorem 6] combined with the approach of [Reference GranvilleGS08], which in turn relies on bounds for short multiplicative character sums from [Reference IwaniecIwa74] (see also [Reference BatemanBS19]). It also uses a combinatorial argument, which originates from [Reference ShparlinskiShp87] and has been used in [Reference Dietmann, Elsholtz and ShparlinskiDES13a, Reference Dietmann, Elsholtz and ShparlinskiDES13b, Reference NaslundNas15].
The constant $\zeta $ in (1.2) is directly related to the constant in the bound on short character sums in [Reference BatemanBS19], see Section 3; it is effective and can be explicitly evaluated.
Using another approach based on the observation that $2^k+1$ is quite smooth if we take k as the product of the first r odd primes, we obtain the following further result in the same direction.
Theorem 1.2 Let $0<\alpha <1$ be fixed. Then there exist infinitely many n-bit integers ${N\geqslant 1}$ which are $Y^{1+o(1)}$ -smooth, where
and $\gamma $ denotes the Euler–Mascheroni constant, which have at most
nonzero digits in their binary expansion.
It is easy to see from the proof of Theorem 1.2 that one can obtain a more uniform version of this result when both $\alpha $ and N vary in such a way that $\alpha ^{-1} = o(\log N)$ . We now make this observation more concrete and use a similar argument to produce another construction in a different regime of smoothness and sparseness.
Theorem 1.3 Let $0\leqslant \alpha \leqslant 1$ be fixed. Then there exist infinitely many n-bit integers ${N\geqslant 1}$ which are $Y^{1+o(1)}$ -smooth, where
and $\gamma $ denotes the Euler–Mascheroni constant, which have at most
nonzero digits in their binary expansion.
1.3 Notation
Throughout the paper, the notations $U = O(V)$ , $U \ll V$ , and $ V\gg U$ are equivalent to $|U|\leqslant c V$ for some positive constant c, which throughout the paper is absolute. If $U\ll V$ and $V\gg U$ , we write $U\asymp V$ .
Moreover, for any quantity $V> 1$ , we write $U = V^{o(1)}$ (as $V \rightarrow \infty $ ) to indicate a function of V which satisfies $ V^{-\varepsilon } \leqslant |U| \leqslant V^\varepsilon $ for any $\varepsilon> 0$ , provided V is large enough. One additional advantage of using $V^{o(1)}$ is that it absorbs $\log V$ and other similar quantities without changing the whole expression.
We also write $U \sim V$ as an equivalent of $(1-\varepsilon ) V \leqslant U \leqslant (1+\varepsilon ) V$ for any $\varepsilon> 0$ , provided V is large enough.
For a finite set ${\mathcal S}$ , we denote its cardinality by $\#{\mathcal S}$ .
For $n\in \mathbb {N}$ , we denote the nth cyclotomic polynomial by $\Phi _n$ and the Euler function by $\varphi $ . Furthermore, we write $A_n$ for the largest absolute value of one of the coefficients of $\Phi _n$ .
For a natural number n, we use $s_2(n)$ to denote the sum of the digits of n in its binary representation.
We write $2=p_1<p_2<\dots $ for the prime numbers.
We denote by $\gamma \approx 0.577 $ the Euler–Mascheroni constant.
Finally, the expressions $1/ab$ mean $1/(ab)$ (which deviates from the canonical interpretation $b/a$ ).
2 Preparations
2.1 Arithmetic functions
We make use of the following well-known upper bound on the number $\tau (w)$ of divisors of a natural number w (see, for example, in [Reference Iwaniec and KowalskiIK04, Equation (1.81)]).
Lemma 2.1 We have
as $w \rightarrow \infty $ .
Bateman [Reference Banks and ShparlinskiBat49] gives the following upper bound on the coefficients of cyclotomic polynomials.
Lemma 2.2 We have
for all $n\geq 1$ .
We also need to bound the Euler function of the product of the first odd primes.
Lemma 2.3 Let $k = p_2\ldots p_r$ for some integer $r\geq 2$ . Then
as $r\rightarrow \infty $ .
Proof This is a direct application of Mertens’ so-called third theorem (see [Reference MacWilliams and SloaneMer74]):
Using that by the prime number theorem
we conclude the proof.
Finally, we need the following elementary result (see [Reference Hare, Laishram and StollHLS11, Proposition 2.2]), which asserts that $s_2$ is subadditive.
Lemma 2.4 For any $m, n\in \mathbb {N}$ , we have
2.2 Counting smooth numbers
Let $\Psi (x, y)$ denote the number of y-smooth numbers less than or equal to x. We have the following result obtained after simple manipulations, by combining [Reference Hildebrand and TenenbaumHT86, Theorem 3] and [Reference Hildebrand and TenenbaumHT86, Equation (2.4)].
Lemma 2.5 For $x\geq y\geq 2$ and $1\leqslant c\leqslant y$ , we have
uniformly, where $u=\log x/\log y$ .
We note that, for completeness, we have presented Lemma 2.5 in full generality, while we only use it for a fixed $c> 1$ and very small (compared to x) values of y. More precisely, we use Lemma 2.5 in the following form.
Lemma 2.6 Fix real numbers $\alpha , \beta>0$ , $c\geq 1$ and $A>1$ . Then
as $x\rightarrow \infty $ .
Proof Using Lemma 2.5 with $\alpha x^\beta $ in place of x and $y=\log ^A x$ , we obtain
Finally,
Since $ \left ( \log ^{A-1}x\right )^{\log c/A\log \log x} = c^{1-1/A}$ , the result follows.
We also need an asymptotic formula for $\Psi (x, \log ^A x)$ (see, for example, [Reference Graham and ShparlinskiGra08, Equation (1.14)]).
Lemma 2.7 For any fixed $A>1$ , we have
as $x\rightarrow \infty $ .
Finally, we need an upper bound of Harper [Reference HarperHar16] on the number of smooth numbers in an arithmetic progression. In fact, we present it in a very special case tailored to our applications. Namely, let $\Psi (x, y; q,a)$ denote the number of y-smooth numbers less than or equal to x in the residue class a modulo q. By [Reference HarperHar16, Smooth Number Result 3, Section 2.1], we have the following estimate.
Lemma 2.8 For any fixed $A>1$ , $\beta>0$ and $\varepsilon>0$ , we have
for all a as $q \leqslant x^{\beta -\varepsilon }$ and $x\rightarrow \infty $ .
2.3 Sums involving binomial coefficients
We recall the definition (1.4). We frequently use the following result from [Reference Mauduit and RivatMS77, Chapter 10, Corollary 9].
Lemma 2.9 For any natural number n and $0<\rho \leqslant 1/2$ , we have
Furthermore, we also need a bound on the product of binomial coefficient or, in other words, on the sum of their logarithms.
Lemma 2.10 For any integer $n\geq 2$ , we have
Proof By the Stirling formula, we have $\log n!=n\log n-n+O(\log n)$ for $n\geq 2$ and, therefore,
whenever $2\leqslant k\leqslant n-2$ and $n\geq 2$ . Summing over all k, we see that
For the remaining sum, partial summation yields
and hence, we obtain
as claimed.
2.4 Character sums modulo powers of $2$
From [Reference BatemanBS19, Theorem 2.1], we deduce the following estimate for character sums modulo powers of $2$ .
Lemma 2.11 There exists an effective constant $\xi>0$ such that for all integers $k\geq 1$ and all non-principal characters $\chi $ modulo $q=2^k$ , we have
uniformly for all integers M and $N=2^\ell $ , where $\ell $ is an integer such that $\ell \leqslant k$ , where implied constant is absolute.
Proof Assume $\chi $ is induced by the primitive character $\widetilde \chi $ modulo $\widetilde q=2^{k_0}$ with $k_0\geq 1$ and let $1\leqslant \widetilde N\leqslant \widetilde q$ such that $N\equiv \widetilde N\pmod {\widetilde q}$ , that is, $\widetilde N=2^{\ell _0}$ with $\ell _0=\ell $ if $\ell \leqslant k_0$ and $\ell _0=k_0$ otherwise. Then
since complete sums of characters (of length $\widetilde q$ in this case) vanish. By [Reference BatemanBS19, Theorem 2.1], there is an effective constant $\xi _0>0$ such that
and the implied constant is absolute. Put $\xi =\min \{1/2, \xi _0\}$ .
Assuming first that $\ell _0=\ell $ , then clearly ${\widetilde N}^{1-\xi {\ell _0}^2/{k_0^2}}\leqslant N^{1-\xi \ell ^2/k^2}$ , so we are done. Now assume that $k_0<\ell $ and $\ell _0=k_0$ . Then we have
and therefore once again ${\widetilde N}^{1-\xi {\ell _0}^2/{k_0^2}}\leqslant N^{1-\xi \ell ^2/k^2}$ .
2.5 Smooth numbers with some bits prescribed
Using techniques from [Reference GranvilleGS08] and modifying the proof of [Reference ShparlinskiShp06, Theorem 6], we prove the following lemma.
Lemma 2.12 Let $A>1$ and $\varepsilon>0$ be fixed real numbers with $2\varepsilon < 1-1/A$ . Then for sufficiently large n and any binary string $\sigma $ of length
where $n_0=\lfloor (1/2-1/2A-\varepsilon )n\rfloor $ and $\xi $ is the constant from Lemma 2.11, there exist at least $2^{n(1-1/A)-m+o(n)}$ odd n-bit integers which are $n^A$ -smooth and have the bit pattern $\sigma $ at the positions $n_0-1, \dots , n_0-m$ .
Proof Let $\mathcal {W}$ be the set of odd $n^A$ -smooth numbers in the interval $(2^{(n-1)/2}, 2^{n/2}]$ , and let s denote the number defined by the binary string $\sigma $ . We count the number $T(k)$ of solutions $w_1, w_2\in \mathcal {W}$ of $w_1w_2\equiv 2^{n_0-m}s+k\pmod {2^{n_0}}$ for $0\leqslant k<2^{n_0-m}$ . Then the product $w_1w_2$ is $n^A$ -smooth and has n bits as well as the desired bit pattern.
Let $\mathcal {X}$ be the set of multiplicative characters modulo $2^{n_0}$ . As in [Reference GranvilleGS08], recalling the orthogonality relation
(see, for example, [Reference Iwaniec and KowalskiIK04, Section 3.2]), we can express $T(k)$ as
where the inverses are taken modulo $2^{n_0}$ (recall that $w_1, w_2\in \mathcal {W}$ are odd). Also observe that $T(k)=0$ if k is even.
If k is odd, separating the contribution from the principal character $\chi _0$ and changing the order of summation, we obtain
This yields
where, using $ \chi \left (w^{-1}\right ) = \overline \chi (w)$ , the error term $\Delta $ is given by
Now, we estimate $\Delta $ , again following [Reference GranvilleGS08]. Namely, we have
by the triangle inequality. By Lemma 2.11, we have the estimate
for any non-principal character $\chi \in \mathcal {X}$ and $n_0$ sufficiently large. Moreover, by our choice of m and $n_0$ , we may further estimate
and therefore the estimate above becomes
Thus, we can further estimate
To estimate the last sum, we change the order of summation and use the orthogonality relations (2.1). Namely, by Lemma 2.8, there are at most $2^{(n/2-n_0)(1-1/A)+o(n)}$ elements of ${\mathcal W}$ in any given residue class modulo $2^{n_0}$ , so we obtain
Therefore, we overall get
To compare the error term with the main term, we need to determine $\#{\mathcal W}$ . To do this, observe that for any x, there is a bijection
and thus, the number of odd $n^A$ -smooth numbers up to x is given by $\Psi (x, n^A)-\Psi (x/2, n^A)$ . Therefore, Lemma 2.6 yields
and due to
this is a positive proportion of $\Psi (2^{(n-1)/2-1}, n^A)$ . Moreover, according to Lemma 2.7,
Combining both results, we deduce that
Therefore, the ratio of the error term to the main term in (2.2) can be bounded by
Thus, putting this result back into (2.2), we obtain
Using (2.3) again, we see that this becomes
To conclude, it still remains to check how many pairs $(w_1, w_2)$ yield the same product $w=w_1w_2$ . However, any such product w satisfies $w\leqslant 2^n$ by construction and hence, by Lemma 2.1, it can occur at most $2^{o(n)}$ times. Therefore, the number of pairwise distinct products is at least
as claimed.
3 Proof of Theorem 1.1
Let $\varepsilon>0$ . We set
It is also convenient to define
and note that there are some constants $c_2> c_1>0$ depending only on A, but not on $\varepsilon $ such that for a sufficiently small $\varepsilon $ ,
Note that the positivity of $c_1$ is crucial for us and, in particular, this implies that for some constants $C_2> C_1>0$ depending only on A, we have
where $\mu _0(A)$ is given by (1.2) with $\zeta = \xi ^{-1/3}$ .
Applying Lemma 2.12 with the above values of $n_0$ and m, we see that the number T of odd n-bit $n^A$ -smooth numbers with a string of m zeros at the positions $n_0-1, \dots , n_0-m$ is at least
Now, consider the $n-m$ bits that we have not prescribed yet. If at most a proportion $\rho <\vartheta _0(A)$ of them are zeros, where $\vartheta _0(A)$ is given by (1.3), then, by Lemma 2.9, we can have at most
different integers. However, since $\rho <\vartheta _0(A)$ , we know that
Recalling (3.2), we conclude that
if n is sufficiently large.
Thus, at least one of the T odd n-bit $n^A$ -smooth numbers not only has a string of m consecutive zeros, which is by construction, but also has at least a proportion of $\rho $ zeros among the remaining $n-m$ digits. That is, we see from (3.1) that its binary expansion contains at least
zeros. Choosing $\rho>\vartheta $ concludes the proof since $\varepsilon $ is arbitrarily small.
4 Proof of Theorem 1.2
Put $k=p_2\ldots p_r$ for some $r>2$ and consider $m=2^k+1$ . We assume that $r \rightarrow \infty $ , so we also have $k \rightarrow \infty $ .
We have the following factorization into cyclotomic polynomials:
and we can bound the factors using Lemmas 2.2 and 2.1 as
Moreover, due to our choice of k, Lemma 2.3 implies
In particular, m is $m^{(2e^{-\gamma }+o(1))/\log \log \log m}$ -smooth.
Now, we consider the number
where $\ell =\lfloor \beta k\rfloor $ for $\beta =2\alpha \log 2$ . Without loss of generality, we assume that k is large enough so $\ell \geqslant 2$ . Thus N has
bits, provided that $k \rightarrow \infty $ . Due to
we also have $\ell \sim (2\alpha \log N)^{1/2}$ . In particular,
Therefore, we see that
that is, N is $Y^{1+o(1)}$ -smooth.
We now estimate the sparsity of N. By the binomial theorem, we know that
Noting that $\binom {\ell }{j}$ can have at most $\log \binom {\ell }{j}/\log 2+1$ binary digits and using the subadditivity of the sum of binary digits guaranteed by Lemma 2.4, we see that Lemma 2.10 shows that the total number of nonzero digits of N is at most
where we have used that $\ell ^2=\beta n+O\left (n^{1/2}\right )$ due to (4.2) in the last step. This proves the claim.
5 Proof of Theorem 1.3
We proceed exactly as in the proof of Theorem 1.2 up to the point where we defined N in (4.1). If $\alpha =0$ , we choose $\ell =1$ and are done; otherwise, let $\ell =\lfloor k^\beta \rfloor $ for
Without loss of generality, we assume that k is large enough so $\ell \geqslant 2$ . Thus N has
bits, provided that $k \rightarrow \infty $ . Due to
we also have $\ell \sim (\log N/\log 2)^{\beta /(1+\beta )}$ . In particular,
Therefore, we see that
that is, N is $Y^{1+o(1)}$ -smooth.
As before, we see that the number of nonzero digits of N is at most
due to $\ell =n^{\beta /(1+\beta )}+O(1)$ by (5.1) and this concludes the proof.
6 Comments
It is also interesting to study smooth values amongst balanced integers, that is, positive integers with equally many ones and zeros in their binary expansion.
Using simple counting arguments, one can show that, for any integer n, there exist $2n$ -bit balanced integers which are Y-smooth, where
Indeed, first, we observe that by the Stirling formula, the number of $2n$ -bit balanced integers is given by
However, for any $u\in [1,2]$ ,
(see [Reference Graham and ShparlinskiGra08, Equations (1.3) and (1.8)]). Thus, if $u =1 +\eta $ with $\eta \asymp (\log x)^{-1/2}$ , then the number of non- $x^{1/u}$ -smooth numbers $N \leqslant x$ can be estimated as
Hence, for a sufficiently small $\varepsilon> 0$ with $\eta = \left (1/2\sqrt {\pi }-\varepsilon \right )n^{-1/2}$ and sufficiently large n, we obtain from (6.2) and (6.3) that
and since $\varepsilon> 0$ is arbitrary, we see that we can take Y as in (6.1).
Furthermore, with a similar technique as in the proofs of Theorems 1.2 and 1.3, one can give an explicit construction of infinitely many rather smooth balanced numbers. Namely, taking
the same argument as above shows that $2^{k_1}+1$ is $2^{(2e^{-\gamma }+o(1))k_1/\log \log k_1}$ -smooth and $2^{k_2}-1$ is $2^{(2e^{-\gamma }+o(1))k_2/\log \log k_2}$ -smooth. Thus, the number $N=(2^{k_1}+1)(2^{k_2}-1)$ is $2^{(2e^{-\gamma }+o(1))k_1/\log \log k_1}=N^{(3e^{-\gamma }/2+o(1))/\log \log \log N}$ -smooth and it has $n = k_1+k_2=4k_2$ total digits, exactly $n/2$ of which are ones.
Acknowledgment
The authors are very grateful to Regis de la Bretèche for suggesting to use results from [Reference HarperHar16] and to the referee for the very careful reading of the manuscript.