Let b and b1 be distinct positive integers larger than 1, and let Ab(n) and Ab1(n) be the number of palindromes in bases b and b1 that are less than or equal to n, respectively. In this article, we finish the comparative study of the functions Ab(n) and Ab1(n). As a result, we present the full picture of the asymptotic behavior of their difference.
Citation: Phakhinkon Napp Phunphayap, Prapanpong Pongsriiam. A complete comparison for the number of palindromes in different bases[J]. AIMS Mathematics, 2023, 8(4): 9924-9932. doi: 10.3934/math.2023502
[1] | Phakhinkon Phunphayap, Prapanpong Pongsriiam . Extremal orders and races between palindromes in different bases. AIMS Mathematics, 2022, 7(2): 2237-2254. doi: 10.3934/math.2022127 |
[2] | Hannah Blasiyus, D. K. Sheena Christy . Two-dimensional array grammars in palindromic languages. AIMS Mathematics, 2024, 9(7): 17305-17318. doi: 10.3934/math.2024841 |
[3] | Jiao Xu, Yinlan Chen . On a class of inverse palindromic eigenvalue problem. AIMS Mathematics, 2021, 6(8): 7971-7983. doi: 10.3934/math.2021463 |
[4] | Pith Peishu Xie . Numerical computations for Operator axioms. AIMS Mathematics, 2021, 6(4): 4011-4024. doi: 10.3934/math.2021238 |
[5] | Naqash Sarfraz, Muhammad Bilal Riaz, Qasim Ali Malik . Some new characterizations of boundedness of commutators of p-adic maximal-type functions on p-adic Morrey spaces in terms of Lipschitz spaces. AIMS Mathematics, 2024, 9(7): 19756-19770. doi: 10.3934/math.2024964 |
[6] | Babar Sultan, Mehvish Sultan, Aziz Khan, Thabet Abdeljawad . Boundedness of an intrinsic square function on grand p-adic Herz-Morrey spaces. AIMS Mathematics, 2023, 8(11): 26484-26497. doi: 10.3934/math.20231352 |
[7] | Eleonora Amoroso, Giuseppina D'Aguì, Valeria Morabito . On a complete parametric Sturm-Liouville problem with sign changing coefficients. AIMS Mathematics, 2024, 9(3): 6499-6512. doi: 10.3934/math.2024316 |
[8] | Ling Zhu . Asymptotic expansion of a finite sum involving harmonic numbers. AIMS Mathematics, 2021, 6(3): 2756-2763. doi: 10.3934/math.2021168 |
[9] | Mayurachat Janthawee, Narakorn R. Kanasri . On the SEL Egyptian fraction expansion for real numbers. AIMS Mathematics, 2022, 7(8): 15094-15106. doi: 10.3934/math.2022827 |
[10] | Swathi Shetty, B. R. Rakshith, N. V. Sayinath Udupa . Extremal graphs and bounds for general Gutman index. AIMS Mathematics, 2024, 9(11): 30454-30471. doi: 10.3934/math.20241470 |
Let b and b1 be distinct positive integers larger than 1, and let Ab(n) and Ab1(n) be the number of palindromes in bases b and b1 that are less than or equal to n, respectively. In this article, we finish the comparative study of the functions Ab(n) and Ab1(n). As a result, we present the full picture of the asymptotic behavior of their difference.
Let b≥2 and n≥1 be integers. We call n a palindrome in base b (or b-adic palindrome) if the b-adic expansion of n=(akak−1⋯a0)b with ak≠0 has the symmetric property ak−i=ai for 0≤i≤k. As usual, if we write a number without specifying the base, then it is always in base 10, and if we write n=(akak−1⋯a0)b, then it means that n=∑ki=0aibi, ak≠0, and 0≤ai<b for all i=0,1,…,k. Throughout this article, we let Ab(n) be the number of b-adic palindromes not exceeding n.
Previously, we [1] obtained an extremal order of Ab(n) and proved that if b>b1≥2 are integers, then
lim supn→∞(Ab(n)−Ab1(n))=+∞ and lim infn→∞(Ab(n)−Ab1(n))<0. |
In addition, if logblogb1 is irrational, then
lim infn→∞(Ab(n)−Ab1(n))=−∞. | (1.1) |
Therefore, it is interesting to determine the value of the left-hand side of (1.1) when b is a rational power of b1. In this article, we show in Theorem 3.1 that if logb/logb1 is an integer, then the left-hand side of (1.1) is −1, and we obtain in Theorem 3.2 that if logb/logb1 is rational but not integral, then the left-hand side of (1.1) is −∞. We also propose some possible research problems at the end of this article. We remark that the study on the ratio Ab(n)/Ab1(n) may be interesting too, but we were previously interested in the sign changes of Ab(n)−Ab1(n), and so we focus only on the difference not the ratio. Nevertheless, since Ab(n)−Ab1(n) has an infinite number of sign changes, if the limit of Ab(n)/Ab1(n) as n→∞ exists, then it must be one.
Perhaps, one of the popular problems in palindromes is to determine whether or not there are infinitely many palindromic primes. Although this problem is still open, Banks, Hart and Sakata [2] showed that almost all palindromes in any fixed base b≥2 are composite. Banks and Shparlinski [3] also obtained results on prime divisors of palindromes, and there are many other interesting articles on palindromes too. We refer the reader to Banks [4], Cilleruelo, Luca and Baxter [5], and Rajasekaran, Shallit and Smith [6] for additive properties of palindromes, Bašić [7,8], Di Scala and Sombra [9], Goins [10], Luca and Togbé [11] for the study of palindromes in different bases, Cilleruelo, Luca and Tesoro [12] for palindromes in linear recurrence sequences, Harminc and Soták [13] for b-adic palindromes in arithmetic progressions, and Pongsriiam [14] for the longest arithmetic progressions of palindromes.
In this section, we provide some results which are needed in the proof of the main theorems. Recall that for a real number x, ⌊x⌋ is the largest integer less than or equal to x, ⌈x⌉ is the smallest integer greater than or equal to x, and {x} is the fractional part of x given by {x}=x−⌊x⌋. It is also convenient to define Cb(n) as follows.
Definition 2.1. Let b≥2 and n=(akak−1⋯a1a0)b be positive integers. We define Cb(n)=(ckck−1⋯c1c0)b to be the b-adic palindrome satisfying ci=ai for k−⌊k/2⌋≤i≤k. In other words, Cb(n) is the b-adic palindrome having k+1 digits whose first half digits are the same as those of n in its b-adic expansion, that is, Cb(n)=(akak−1⋯ak−⌊k2⌋⋯ak−1ak)b.
In the following lemma, if P is a mathematical statement, then the Iverson notation [P] is defined by [P]=1 if P holds, and [P]=0 otherwise. Then the formula for Ab(n) is as follows.
Lemma 2.1. [15] Let b≥2, n≥1, and n=(akak−1⋯a1a0)b be integers. Then the number of b-adic palindromes less than or equal to n is given by
Ab(n)=b⌈k2⌉+∑0≤i≤⌊k2⌋ak−ib⌊k2⌋−i+[n≥Cb(n)]−2. |
Lemma 2.2. Let a,r,s≥2 be integers and (r,s)=1. If ars is an integer, then there exists an integer c≥2 such that a=cs.
Proof. Suppose ars=m is an integer. Then ar=ms, and so a and m have the same set of prime divisors. Let a=∏ki=1paii and m=∏ki=1pmii. Then air=mis for all i. Since s∣air and (s,r)=1, s∣ai for all i. Let c=∏ki=1pai/si. Then c is an integer, c≥2, and a=cs. So the proof is complete.
Theorem 3.1. Let b>b1≥2 and ℓ≥2 be integers. Suppose that b=bℓ1. Then, the following statements hold.
(i) Ab(n)−Ab1(n)≥−1 for all n∈N.
(ii) Ab(n)−Ab1(n)=−1 for infinitely many n∈N.
(iii) lim infn→∞(Ab(n)−Ab1(n))=−1.
Proof. We first prove (i). Let n≥1 and write
n=(akak−1⋯a0)b1=(crcr−1⋯c0)b. |
Since br≤crbr≤n<br+1, we see that r=⌊lognlogb⌋. Similarly, we have k=⌊lognlogb1⌋, and so r=⌊k/ℓ⌋. By the uniqueness of the b-adic and b1-adic representations, we can write c0, c1, c2,…, cr in terms of b1 and the aj as follows:
Considering n modulo b, we obtain
\begin{equation*} c_0 \equiv a_0 + a_1 b_1 + a_2 b_{1}^{2} + \cdots + a_{\ell - 1} b_{1}^{\ell - 1} \pmod{b}, \end{equation*} |
and both sides of the congruence are nonnegative integers less than b , and so they are equal. Similarly, after reducing n modulo b^2, b^3, \ldots, b^{r + 1} , respectively, we obtain c_1, c_2, \ldots c_{r} . Thus
\begin{equation*} c_j = \sum\limits_{i = 0}^{\ell - 1} a_{j\ell + i}b_{1}^{i} \ \ \text{for every $j = 0, 1, 2, \ldots, r$}, \end{equation*} |
where a_{m} = 0 if m > k . By Lemma 2.1, we have
\begin{equation} A_{b_{1}} (n) = b_{1}^{\left\lceil \frac{k}{2} \right\rceil} + \sum\limits_{0 \leq i \leq \left\lfloor \frac{k}{2} \right\rfloor} a_{k - i}b_{1}^{\left\lfloor \frac{k}{2} \right\rfloor - i} + [n \geq C_{b_{1}} (n)] - 2, \end{equation} | (3.1) |
\begin{align} A_{b} (n) & = b^{\left\lceil \frac{r}{2} \right\rceil} + \sum\limits_{0 \leq j \leq \left\lfloor \frac{r}{2} \right\rfloor} c_{r - j}b^{\left\lfloor \frac{r}{2} \right\rfloor - j} + [n \geq C_{b} (n)] - 2 \\ & = b_{1}^{\ell \left\lceil \frac{\left\lfloor \frac{k}{\ell} \right\rfloor}{2} \right\rceil} + \sum\limits_{0 \leq j \leq \left\lfloor \frac{k}{2\ell} \right\rfloor} \left( \sum\limits_{i = 0}^{\ell - 1} a_{(r - j)\ell + i} b_{1}^{i} \right)b_{1}^{\ell \left( \left\lfloor \frac{k}{2\ell} \right\rfloor - j \right)} + [n \geq C_{b} (n)] - 2. \end{align} | (3.2) |
It is useful to recall that if k\in\mathbb{Z} and x\in\mathbb{R} , then \lfloor k+x\rfloor = k + \lfloor x\rfloor , and if k\in\mathbb{N} and x\in\mathbb{R} , then \left\lfloor\frac{\lfloor x\rfloor}{k}\right\rfloor = \left\lfloor\frac{x}{k}\right\rfloor . We also let s = k \bmod{\ell} be the least nonnegative residue of k modulo \ell , that is, k \equiv s \pmod{\ell} and 0 \leq s < \ell . Then, from (3.1) and (3.2), we obtain
\begin{equation} A_{b_1} (n) = \begin{cases} b_{1}^{\frac{k}{2}} + \sum\limits_{0 \leq i \leq \frac{k}{2}} a_{k - i} b_{1}^{\frac{k}{2} - i} + [n \geq C_{b_1} (n)] - 2, &\text{if $k$ is even;} \\ b_{1}^{\frac{k + 1}{2}} + \sum\limits_{0 \leq i \leq \frac{k - 1}{2}} a_{k - i} b_{1}^{\frac{k - 1}{2} - i} + [n \geq C_{b_1} (n)] - 2, &\text{if $k$ is odd, } \end{cases} \end{equation} | (3.3) |
\begin{equation} A_{b} (n) = \begin{cases} b_{1}^{\frac{k - s}{2}} + \sum\limits_{0 \leq j \leq \frac{k - s}{2\ell}} \sum\limits_{i = 0}^{\ell - 1} a_{k - s - \ell j + i} b_{1}^{\frac{k - s}{2} - \ell j + i} + [n \geq C_{b} (n)] - 2, &\text{if $\left\lfloor \frac{k}{\ell} \right\rfloor$ is even;}\\ b_{1}^{\frac{k - s + \ell}{2}} + \sum\limits_{0 \leq j \leq \frac{k - s - \ell}{2\ell}} \sum\limits_{i = 0}^{\ell - 1} a_{k - s - \ell j + i} b_{1}^{\frac{k - s - \ell}{2} - \ell j + i} + [n \geq C_{b} (n)] - 2, &\text{if $\left\lfloor \frac{k}{\ell} \right\rfloor$ is odd.} \end{cases} \end{equation} | (3.4) |
Next, we will reduce the double sum in (3.4) into a sum. We see that if \left\lfloor \frac{k}{\ell} \right\rfloor is even, then - \ell j + i runs through the integers from - \frac{k - s}{2} to \ell - 1 exactly once as j runs through 0, 1, 2, \ldots, \frac{k - s}{2\ell} and i runs through 0 to \ell - 1 . Similarly, if \left\lfloor \frac{k}{\ell} \right\rfloor is odd, then - \ell j + i ranges over the integers from - \frac{k - s - \ell}{2} to \ell - 1 exactly once as j ranges over 0, 1, 2, \ldots, \frac{k - s - \ell}{2\ell} and i ranges over 0 to \ell - 1 . So if \left\lfloor \frac{k}{\ell} \right\rfloor is even, the first double sum in (3.4) reduces to
\begin{equation*} \sum\limits_{-\frac{k - s}{2} \leq i \leq \ell - 1} a_{k - s + i} b_{1}^{\frac{k - s}{2} + i}. \end{equation*} |
We replace the index i by i - \frac{k - s}{2} and recall that s \leq \ell - 1 , a_{\frac{k - s}{2} + i} = 0 if i > \frac{k + s}{2} , and \ell - 1 + \frac{k - s}{2} \geq \frac{k + s}{2} . So the first double sum in (3.4) further reduces to
\begin{equation*} \sum\limits_{0 \leq i \leq \frac{k + s}{2}} a_{\frac{k - s}{2} + i}b_{1}^i. \end{equation*} |
Similarly, if \left\lfloor \frac{k}{\ell} \right\rfloor is odd, then the second double sum in (3.4) reduces to
\begin{equation*} \sum\limits_{- \frac{k - s - \ell}{2} \leq i \leq \ell - 1} a_{k - s + i} b_{1}^{\frac{k - s - \ell}{2} + i} = \sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^i. \end{equation*} |
From (3.4) and the above calculation, we obtain
\begin{equation} A_{b} (n) = \begin{cases} b_{1}^{\frac{k - s}{2}} + \sum\limits_{0 \leq i \leq \frac{k + s}{2}} a_{\frac{k - s}{2} + i}b_{1}^i + [n \geq C_{b} (n)] - 2, &\text{if $\left\lfloor \frac{k}{\ell} \right\rfloor$ is even;} \\ b_{1}^{\frac{k - s + \ell}{2}} + \sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^i + [n \geq C_{b} (n)] - 2, &\text{if $\left\lfloor \frac{k}{\ell} \right\rfloor$ is odd.} \end{cases} \end{equation} | (3.5) |
Next, we divide the proof into four cases according to the parity of k and \left\lfloor \frac{k}{\ell} \right\rfloor .
Case 1. Assume that k and \left \lfloor \frac{k}{\ell} \right\rfloor are even. Then, s is even and
\begin{equation*} \sum\limits_{0 \leq i \leq \frac{k + s}{2}} a_{\frac{k - s}{2} + i}b_{1}^i \geq b_{1}^{\frac{s}{2}} \sum\limits_{\frac{s}{2} \leq i \leq \frac{k + s}{2}} a_{\frac{k - s}{2} + i} b_{1}^{i - \frac{s}{2}} = b_{1}^{\frac{s}{2}} \sum\limits_{0 \leq i \leq \frac{k}{2}} a_{k - i}b_{1}^{\frac{k}{2} - i}. \end{equation*} |
By (3.3), (3.5) and the above inequality, we obtain that A_b (n) - A_{b_1} (n) is at least
\begin{equation*} b_{1}^{\frac{k - s}{2}} - b_{1}^{\frac{k}{2}} + \left( b_{1}^{\frac{s}{2}} - 1 \right) \sum\limits_{0 \leq i \leq \frac{k}{2}} a_{k - i}b_{1}^{\frac{k}{2} - i} - 1 \geq b_{1}^{\frac{k - s}{2}} - b_{1}^{\frac{k}{2}} + a_{k}b_{1}^{\frac{k}{2}}\left( b_{1}^{\frac{s}{2}} - 1 \right) - 1 = b_{1}^{\frac{k}{2}} \left( a_k b_{1}^{\frac{s}{2}} + b_{1}^{-\frac{s}{2}}-a_k-1 \right)-1. \end{equation*} |
Since the function x \mapsto a_{k} x + x^{-1} is increasing on [1, \infty) , the number in the above parenthesis is nonnegative, and so A_b (n) - A_{b_1} (n) \geq -1 .
Case 2. Assume that k is odd and \left\lfloor \frac{k}{\ell} \right\rfloor is even. Then s is odd. Similar to Case 1, we obtain
\begin{equation*} \sum\limits_{0 \leq i \leq \frac{k + s}{2}} a_{\frac{k - s}{2} + i}b_{1}^i \geq b_{1}^{\frac{s + 1}{2}} \sum\limits_{\frac{s + 1}{2} \leq i \leq \frac{k + s}{2}} a_{\frac{k - s}{2} + i} b_{1}^{i - \frac{s + 1}{2}} \geq b_{1}^{\frac{s + 1}{2}} \sum\limits_{0\leq i \leq \frac{k - 1}{2}} a_{k - i} b_{1}^{\frac{k - 1}{2} - i}. \end{equation*} |
By (3.3), (3.5) and the above inequality, we see that A_{b} (n) - A_{b_1} (n) is at least
\begin{equation*} b_{1}^{\frac{k - s}{2}} - b_{1}^{\frac{k + 1}{2}} + a_k b_{1}^{\frac{k - 1}{2}}\left( b_{1}^{\frac{s + 1}{2}} - 1 \right) - 1 = b_{1}^{\frac{k}{2}} \left( a_{k} b_{1}^{\frac{s}{2}} + b_{1}^{- \frac{s}{2}} - a_{k} b_{1}^{- \frac{1}{2}} - b_{1}^{\frac{1}{2}} \right) - 1. \end{equation*} |
Since x \mapsto a_{k} x + x^{-1} is increasing on [1, \infty) and b_{1}^{\frac{s}{2}} \geq b_{1}^{\frac{1}{2}} \geq 1 , we have a_{k} b_{1}^{\frac{s}{2}} + b_{1}^{- \frac{s}{2}} \geq a_{k} b_{1}^{\frac{1}{2}} + b_{1}^{-\frac{1}{2}} , and
\begin{equation*} A_{b} (n) - A_{b_{1}} (n) \geq b_{1}^{\frac{k}{2}} \left( a_{k} b_{1}^{\frac{1}{2}} + b_{1}^{- \frac{1}{2}} - a_{k} b_{1}^{-\frac{1}{2}} - b_{1}^{\frac{1}{2}} \right) - 1 = b_{1}^{\frac{k}{2}} \left( a_{k} - 1 \right) \left( b_{1}^{\frac{1}{2}} - b_{1}^{-\frac{1}{2}} \right) - 1 \geq -1. \end{equation*} |
Case 3. Assume that k is even and \left\lfloor \frac{k}{\ell} \right\rfloor is odd. Then \ell \equiv k - s \equiv s \pmod{2} . So \frac{\ell - s}{2} is an integer and \frac{\ell - s}{2} > 0 . So \frac{\ell - s}{2} \geq 1 . Considering the first sum in (3.3) and changing the index from i to \frac{k + s - \ell}{2} - i , we see that
\begin{align*} \sum\limits_{0 \leq i \leq \frac{k}{2}} a_{k - i} b_{1}^{\frac{k}{2} - i} & = \sum\limits_{- \frac{\ell - s}{2} \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i + \frac{\ell - s}{2}} = b_{1}^{\frac{\ell - s}{2}}\sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i } + \sum\limits_{- \frac{\ell - s}{2} \leq i < 0} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i + \frac{\ell - s}{2}} \\ & = b_{1}^{\frac{\ell - s}{2}}\sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i } + \sum\limits_{0 \leq i < \frac{\ell - s}{2}} a_{\frac{k}{2} + i} b_{1}^{i} \leq b_{1}^{\frac{\ell - s}{2}}\sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i } + \left( b_{1}^{\frac{\ell - s}{2}} - 1 \right). \end{align*} |
By (3.3), (3.5) and the above inequality, we obtain
\begin{equation} A_{b} (n) - A_{b_1} (n) \geq b_{1}^{\frac{k - s + \ell}{2}} - b_{1}^{\frac{k}{2}} + \left( 1 - b_{1}^{\frac{\ell - s}{2}} \right) \sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i } - \left( b_{1}^{\frac{\ell - s}{2}} - 1 \right) - 1. \end{equation} | (3.6) |
The sum on the right-hand side of (3.6) is less than or equal to b_{1}^{\frac{k + s -\ell}{2} + 1} - 1 and 1 - b_{1}^{\frac{\ell - s}{2}} is negative. Therefore, A_{b} (n) - A_{b_1} (n) is at least
\begin{equation*} b_{1}^{\frac{k - s + \ell}{2}} - b_{1}^{\frac{k}{2}} + \left( 1 - b_{1}^{\frac{\ell - s}{2}} \right) \left( b_{1}^{\frac{k + s - \ell}{2} + 1} - 1 \right) + \left( 1 - b_{1}^{\frac{\ell - s}{2}} \right) - 1 = b_{1}^{\frac{k}{2}} \left( b_{1}^{\frac{\ell - s}{2}} + b_{1}^{1 - \frac{\ell - s}{2}} - b_{1} - 1 \right) - 1. \end{equation*} |
Since the function x \mapsto b_{1}^{x} + b_{1}^{1 - x} is increasing on [1, \infty) and \frac{\ell - s}{2} \geq 1 , the number in the above parenthesis is nonnegative, and so A_{b} (n) - A_{b_1} (n) \geq - 1 .
Case 4. Assume that k and \left \lfloor \frac{k}{\ell} \right\rfloor are odd. Changing the index from i to \frac{k - 1}{2} - \frac{\ell - s - 1}{2} - i , the second sum in (3.3) is
\begin{align*} \sum\limits_{0 \leq i \leq \frac{k - 1}{2}} a_{k - i} b_{1}^{\frac{k - 1}{2} - i} & = \sum\limits_{- \frac{\ell - s - 1}{2} \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i + \frac{\ell - s - 1}{2}} = b_{1}^{\frac{\ell - s - 1}{2}} \sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i} + \sum\limits_{- \frac{\ell - s - 1}{2} \leq i < 0} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i + \frac{\ell - s - 1}{2}} \\ &\leq b_{1}^{\frac{\ell - s - 1}{2}} \sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i} + \left( b_{1}^{\frac{\ell - s - 1}{2}} - 1\right). \end{align*} |
By (3.3), (3.5) and the above inequality, we obtain that A_{b} (n) - A_{b_{1}} (n) is at least
\begin{align*} & b_{1}^{\frac{k - s + \ell}{2}} - b_{1}^{\frac{k + 1}{2}} + \left( 1 - b_{1}^{\frac{\ell - s - 1}{2}} \right)\sum\limits_{0 \leq i \leq \frac{k + s - \ell}{2}} a_{\frac{k - s + \ell}{2} + i} b_{1}^{i} - \left( b_{1}^{\frac{\ell - s - 1}{2}} - 1\right) - 1 \\ \geq &b_{1}^{\frac{k - s + \ell}{2}} - b_{1}^{\frac{k + 1}{2}} + \left( 1 - b_{1}^{\frac{\ell - s - 1}{2}} \right) \left( b_{1}^{\frac{k + s - \ell}{2} + 1} - 1 \right) + \left( 1 - b_{1}^{\frac{\ell - s - 1}{2}} \right) - 1 \\ = &b_{1}^{\frac{k + 1}{2}} \left( b_{1}^{\frac{\ell - s - 1}{2}} + b_{1}^{- \frac{\ell - s - 1}{2}} - 2 \right) - 1. \end{align*} |
Since x + x^{-1} \geq 2 for all x > 0 , we see that A_{b} (n) - A_{b_{1}} (n) \geq -1 .
In any case, we obtain A_{b} (n) - A_{b_1} (n) \geq -1 , as desired. This proves (i).
Next, we prove (ii). For each k \in \mathbb{N} , let n = n_{k} = b_{1}^{2\ell k - 1} + 1 . Then n = b_{1}^{\ell - 1} b^{2k - 1} + 1 . By Lemma 2.1, we obtain
\begin{equation*} A_{b_1} (n) = b_{1}^{\left\lceil \frac{2\ell k - 1}{2} \right\rceil} + b_{1}^{\left\lfloor \frac{2\ell k - 1}{2} \right\rfloor} - 1 = b_{1}^{k \ell} + b_{1}^{k \ell - 1} - 1, \end{equation*} |
\begin{equation*} A_{b} (n) = b^{\left\lceil \frac{2k - 1}{2} \right\rceil} + b_{1}^{\ell - 1} b^{\left\lfloor \frac{2k - 1}{2} \right\rfloor} - 2 = b^{k} + b_{1}^{\ell - 1} b^{k - 1} - 2 = b_{1}^{k \ell} + b_{1}^{k \ell - 1} - 2. \end{equation*} |
Therefore A_{b} (n) - A_{b_1} (n) = -1 . Since n = n_k and k is arbitrary, this shows that there are infinitely many n \in \mathbb{N} such that A_{b} (n) - A_{b_1} (n) = -1 . This proves (ii). Then (iii) follows immediately from (i) and (ii). So the proof is complete.
Since we have already got the answers to the cases when \log b/ \log b_{1} is irrational and when it is integral, it remains to consider the case when \log b / \log b_{1} is a rational number and is not an integer.
Theorem 3.2. Let b > b_1 \geq 2 be integers and b = b_{1}^{\frac{r}{s}} where r, s \in \mathbb{N} , r > s > 1 , and (r, s) = 1 . Then
\begin{equation*} \liminf\limits_{n \rightarrow \infty} \left( A_{b} (n) - A_{b_{1}} (n) \right) = - \infty. \end{equation*} |
Proof. To prove this theorem, it is enough to find a sequence (n_k)_{k \geq 1} of positive integers such that n_k \rightarrow + \infty and A_{b_{1}} (n_k) - A_{b} (n_k) \rightarrow + \infty as k \rightarrow + \infty . We divide the calculation into three cases according to parity of r and s , and adjust the exponents so that A_{b_1} (n) is large and A_{b} (n) is small.
Case 1. Assume that s is even. Let k be a positive integer and n = n_{k} = b^{s (2k + 1)} + 1 . Since (r, s) = 1 , s is even, and b_{1}^{r} = b^{s} , we see that r is odd and n = b_{1}^{r (2k + 1)} + 1 . By Lemma 2.1, we obtain A_{b} (n) = 2b^{sk + \frac{s}{2}} - 1 and
\begin{equation*} A_{b_{1} (n)} = b_{1}^{\left\lceil \frac{r(2k + 1)}{2} \right\rceil} + b_{1}^{\left\lfloor \frac{r(2k + 1)}{2} \right\rfloor} - 1 = b_{1}^{kr + \frac{r + 1}{2}} + b_{1}^{kr + \frac{r - 1}{2}} - 1 = b_{1}^{\frac{1}{2}} b^{sk + \frac{s}{2}} + b_{1}^{- \frac{1}{2}} b^{sk + \frac{s}{2}} - 1. \end{equation*} |
Since x + x^{-1} > 2 for all x > 1 , we see that b_{1}^{\frac{1}{2}} + b_{1}^{- \frac{1}{2}} - 2 is a positive constant. Therefore,
\begin{equation*} A_{b_1} (n) - A_{b} (n) = b^{sk + \frac{s}{2}} \left( b_{1}^{\frac{1}{2}} + b_{1}^{-\frac{1}{2}} - 2 \right) \rightarrow + \infty \ \ \text{as}~~ k \rightarrow + \infty . \end{equation*} |
Case 2. Assume that s and r are odd. Since b_{1}^{\frac{r}{s}} = b is an integer, we obtain by Lemma 2.2 an integer b_{2} \geq 2 such that b_{1} = b_{2}^{s} , and so b = b_{2}^{r} . Since (2s, r) = 1 , there exists a negative integer x such that 2sx \equiv 1 \pmod{r} . Since the proof of Case 1 is finished, we will define a new sequence (n_{k})_{k \geq 1} using the same notation. Let k be a positive integer and let n = n_{k} = b_{1}^{2x (1 - s) + 2rk + 1} + 1 . For convenience, let \ell = x(1 - s) + rk . So \ell \in \mathbb{N} , \ell \geq 5 , and n = b_{1}^{2\ell + 1} + 1 . By Lemma 2.1 and the fact that b_{1} = b_{2}^{s} , we obtain
\begin{equation} A_{b_1} (n) = b_{1}^{\ell + 1} + b_{1}^{\ell} - 1 = b_{2}^{s\ell + s} + b_{2}^{s\ell} - 1. \end{equation} | (3.7) |
Next, let y = \frac{s (2 \ell + 1) - 1}{r} . By the definition of \ell and x , we have
\begin{equation*} s(2\ell + 1) = 2sx (1 - s) + 2srk + s \equiv 1 \pmod{r}. \end{equation*} |
Therefore y is a positive integer. Since s(2 \ell + 1) - 1 is even and r is odd, we see that y is even. To calculate A_{b} (n) , we write
\begin{equation*} n = b_{1}^{2\ell + 1} + 1 = b_{2}^{s(2\ell + 1)} + 1 = b_{2}^{ry + 1} + 1 = b_{2} \cdot b^{y} + 1. \end{equation*} |
So b_{2} is the leading digit in the b -adic representation of n . Since y is even and b = b_{2}^{r} , we obtain by Lemma 2.1 that
\begin{equation} A_{b} (n) = b_{2}^{\frac{ry}{2}} (1+ b_2) - 2 = b_{2}^{s \ell + \frac{s - 1}{2}} (1 + b_2) - 2. \end{equation} | (3.8) |
From (3.7) and (3.8), we obtain
\begin{equation*} A_{b_1} (n) - A_{b} (n) = b_{2}^{s \ell + \frac{s}{2}} B + 1, \ \ \text{where}~~ B = b_{2}^{\frac{s}{2}} + b_{2}^{-\frac{s}{2}} - b_{2}^{-\frac{1}{2}} - b_{2}^{\frac{1}{2}} . \end{equation*} |
Since the function x \mapsto x + x^{-1} is strictly increasing on (1, \infty) and b_{2}^{\frac{s}{2}} > b_{2}^{\frac{1}{2}} > 1 , we see that B is a positive constant. Therefore, A_{b_{1}} (n) - A_{b} (n) = b_{2}^{s\ell + \frac{s}{2}}B + 1 \rightarrow + \infty as \ell \rightarrow + \infty . Since \ell = x(1 - s) + rk \geq k , we see that A_{b_1} (n) - A_{b} (n) \rightarrow + \infty as k \rightarrow + \infty . So the proof of Case 2 is complete.
Case 3. Assume that s is odd and r is even. This case is similar to Case 2 and we only need to modify some calculations. Again, we have b_{1} = b_{2}^s and b = b_{2}^{r} for some integer b_{2} \geq 2 . Since (2r, 2s) = 2 and 2 \mid 1 - s , there exists a positive integer k such that
\begin{equation} 2sk \equiv 1 - s \pmod{2r}. \end{equation} | (3.9) |
In fact, there are infinitely many positive integers k satisfying (3.9), so we can choose k to be arbitrarily large. Let n = n_{k} = b_{1}^{2k + 1} + 1 . By Lemma 2.1 and the fact that b_{1} = b_{2}^{s} , we obtain
\begin{equation} A_{b_1} (n) = b_{1}^{k + 1} + b_{1}^{k} - 1 = b_{2}^{sk + s} + b_{2}^{sk} - 1. \end{equation} | (3.10) |
Next, let y = \frac{s(2k + 1) - 1}{r} . By (3.9), we have s(2k + 1) = 2sk + s \equiv 1 \pmod{2r} . Therefore 2r divides s(2k + 1) - 1 , and thus y = 2 \left(\frac{s(2k + 1) - 1}{2r} \right) is an even positive integer. To calculate A_{b} (n) , we write
\begin{equation*} n = b_{1}^{2k + 1} + 1 = b_{2}^{s (2k + 1)} + 1 = b_{2}^{ry + 1} + 1 = b_{2}\cdot b^{y} + 1. \end{equation*} |
By Lemma 2.1, we obtain
\begin{equation} A_{b} (n) = b_{2}^{\frac{ry}{2}} (1 + b_2) - 2 = b_{2}^{ks + \frac{s - 1}{2}} \left( 1 + b_2 \right) - 2. \end{equation} | (3.11) |
From (3.10), (3.11) and a similar reason as in Case 2, we obtain
\begin{equation*} A_{b_{1}} (n) - A_{b} (n) = b_{2}^{ks + \frac{s}{2}} \left( b_{2}^{\frac{s}{2}} + b_{2}^{- \frac{s}{2}} - b_{2}^{- \frac{1}{2}} - b_{2}^{\frac{1}{2}} \right) + 1 \rightarrow + \infty \ \ \text{as}~~ k \rightarrow + \infty . \end{equation*} |
This completes the proof.
Let us record all related results that we obtained as follows.
Summary of the results:
Let b > b_{1} \geq 2 be integers. Then, the following statements hold.
(i) If \frac{\log b}{\log b_{1}} is not an integer, then,
\begin{equation*} \limsup\limits_{n \rightarrow \infty} \left( A_{b} (n) - A_{b_{1}} (n) \right) = + \infty \ \ \text{and}\ \ \liminf\limits_{n \rightarrow \infty} \left( A_{b} (n) - A_{b_{1}} (n) \right) = - \infty. \end{equation*} |
(ii) If \frac{\log b}{\log b_{1}} is an integer, then,
\begin{equation*} \limsup\limits_{n \rightarrow \infty} \left( A_{b} (n) - A_{b_{1}} (n) \right) = + \infty \ \ \text{and}\ \ \liminf\limits_{n \rightarrow \infty} \left( A_{b} (n) - A_{b_{1}} (n) \right) = - 1. \end{equation*} |
(iii) A_{b} (n) - A_{b_{1}} (n) has an infinite number of sign changes as n \rightarrow \infty .
(iv) If s_{b} and s_{b_{1}} are the sums of the reciprocal of palindromes in bases b and b_{1} , respectively, then s_b and s_{b_1} are finite and s_{b} > s_{b_{1}} .
The statements (i)–(iii) come directly from [1, Theorems 11 and 12], and Theorems 3.1 and 3.2 of this article. The finiteness of s_b and s_{b_1} in (iv) is given by Shallit and Klauser [16] and the inequality s_b > s_{b_1} is obtained from [17, Theorem 3].
Now that for all cases we have obtained results for the comparison between the number of palindromes in two bases, it is natural to extend this to more than two bases. So let k \geq 2 and b_{1} > b_{2} > \cdots > b_{k} \geq 2 be integers. Let c_1, c_2, \ldots, c_k be any permutation of b_{1}, b_2, \ldots, b_{k} .
Question 4.1. Does the inequality A_{c_1}(n) < A_{c_2}(n) < \cdots < A_{c_k}(n) hold for infinitely many n \in \mathbb{N} ? We conjecture that if \log b_{i}/ \log b_{j} is irrational for every distinct i, j = 1, 2, \ldots, k , then the inequality holds for infinitely many n \in \mathbb{N} . What are the answers when one of the following situations occur?
(i) \frac{\log b_i}{\log b_{i + 1}} is integral for every i = 1, 2, \ldots, k-1 ;
(ii) \frac{\log b_i}{\log b_{j}} is rational but not integral for each distinct i , j ;
(iii) The set \left\{ \left. \frac{\log b_i}{\log b_j} \ \right|\ 1\leq i < j \leq k \right\} contains both an irrational number and a rational number.
Prapanpong Pongsriiam's research project is funded jointly by the Faculty of Science Silpakorn University and the National Research Council of Thailand (NRCT), grant number NRCT5-RSA63021-02. He is also supported by the Tosio Kato Fellowship given by the Mathematical Society of Japan during his visit at Nagoya University in July 2022 to July 2023.
The authors declare no conflicts of interest regarding the publication of this article.\newpage
[1] |
P. Phunphayap, P. Pongsriiam, Extremal orders and races between palindromes in different bases, AIMS Math., 7 (2022), 2237–2254. https://doi.org/10.3934/math.2022127 doi: 10.3934/math.2022127
![]() |
[2] |
W. D. Banks, D. N. Hart, M. Sakata, Almost all palindromes are composite, Math. Res. Lett., 11 (2004), 853–868. https://doi.org/10.4310/MRL.2004.v11.n6.a10 doi: 10.4310/MRL.2004.v11.n6.a10
![]() |
[3] |
W. D. Banks, I. E. Shparlinski, Prime divisors of palindromes, Period. Math. Hung., 51 (2005), 1–10. https://doi.org/10.1007/s10998-005-0016-6 doi: 10.1007/s10998-005-0016-6
![]() |
[4] | W. D. Banks, Every natural number is the sum of forty-nine palindromes, Integers, 16 (2016), 1–9. |
[5] |
J. Cilleruelo, F. Luca, L. Baxter, Every positive integer is a sum of three palindromes, Math. Comput., 87 (2018), 3023–3055. https://doi.org/10.1090/mcom/3221 doi: 10.1090/mcom/3221
![]() |
[6] | A. Rajasekaran, J. Shallit, T. Smith, Sums of palindromes: an approach via automata, In: 35th symposium on theoretical aspects of computer science (STACS 2018), 54: 1–54: 12. https://doi.org/10.4230/LIPIcs.STACS.2018.54 |
[7] |
B. Bašić, On d-digit palindromes in different bases: the number of bases is unbounded, Int. J. Number Theory, 8 (2012), 1387–1390. https://doi.org/10.1142/S1793042112500819 doi: 10.1142/S1793042112500819
![]() |
[8] |
B. Bašić, On " very palindromic" sequences, J. Korean Math. Soc., 52 (2015), 765–780. https://doi.org/10.4134/jkms.2015.52.4.765 doi: 10.4134/jkms.2015.52.4.765
![]() |
[9] | A. J. Di Scala, M. Sombra, Intrinsic palindromes, Fibonacci Quart., 42 (2004), 76–81. |
[10] |
E. H. Goins, Palindromes in different bases: a conjecture of J. Ernest Wilkins, Integers, 9 (2009), 725–734. https://doi.org/10.1515/INTEG.2009.059 doi: 10.1515/INTEG.2009.059
![]() |
[11] |
F. Luca, A. Togbé, On binary palindromes of the form 10^n \pm1, C. R. Math., 346 (2008), 487–489. https://doi.org/10.1016/j.crma.2008.03.015 doi: 10.1016/j.crma.2008.03.015
![]() |
[12] |
J. Cilleruelo, R. Tesoro, F. Luca, Palindromes in linear recurrence sequences, Monatsh. Math., 171 (2013), 433–442. https://doi.org/10.1007/s00605-013-0477-2 doi: 10.1007/s00605-013-0477-2
![]() |
[13] | M. Harminc, R. Soták, Palindromic numbers in arithmetic progressions, Fibonacci Quart., 36 (1998), 259–261. |
[14] |
P. Pongsriiam, Longest arithmetic progressions of palindromes, J. Number Theory, 222 (2021), 362–375. https://doi.org/10.1016/j.jnt.2020.10.018 doi: 10.1016/j.jnt.2020.10.018
![]() |
[15] | P. Pongsriiam, K. Subwattanachai, Exact formulas for the number of palindromes up to a given positive integer, Int. J. Math. Comput. Sci., 14 (2019), 27–46. |
[16] | H. Klauser, J. Shallit, Sum of base-b palindrome reciprocals, Fibonacci Quart., 19 (1981), 469. |
[17] | P. Phunphayap, P. Pongsriiam, Reciprocal sum of palindromes, J. Integer Seq., 22 (2019), 1–13. |