12

Question

Let $m$ and $k$ be positive integers. Let $f(m, km)$ be the number of rectangles (including squares) on a $m$ by $km$ checkerboard. Determine all ordered pairs $(m, k)$ for which $f(m, km)$ is a perfect square.

This is question 10 in the Checkerboards chapter of the math olympiad book Combinatorial Explorations (2005) by Hoshino and McLoughlin; see page 56 here.

Progress

Because a $x \times y$ checkerboard has $\binom{x+1}{2} \times \binom{y+1}{2}$ rectangles, we see that $$f(m, km)=\binom{m+1}{2} \times \binom{km+1}{2}=\frac{km^2(m+1)(km+1)}{4}.$$

If $f(m, km)$ is a perfect square, then $(km+k)(km+1)$ must be a perfect square so that $(km+k)(km+1)=x^2$ for some $x\in \mathbb{N}$. It's easy to find that $(m, 1)$ is a family of solutions.

I checked the sequence OEIS A082649 (Triangle of coefficients in expansion of $\sinh^2(nx)$ in powers of $\sinh x$), and found out that it had a relationship with this question. In particular, for a fixed $m$, empirically it seems that the first smallest $k$ is $1$, the second smallest $k$ is $4m+4$, the third smallest $k$ is $16m^2+24m+9$, and the fourth smallest $k$ is $64m^3+128m^2+80m+16$. On the other hand, the triangle of coefficients from OEIS begins $1$; $4, 4$; $16, 24, 9$; $64, 128, 80, 16$; ..., and so on. I am not sure how this sequence is related to this question, but it may not be a coincidence.

Conjecture

From the sequence, one of my classmates formed the following conjecture:

Conjecture: For any positive integer $m$, let $$k=\frac{\sinh^2(n \sinh^{-1} (\sqrt{m}))}{m}$$ where $n$ is any positive integer. Then $$\frac{km^2(m+1)(km+1)}{4}$$ is an integer and moreover a perfect square.

I have tried to further simplify $f(m, km)$ given in the conjecture, and I finally get the following result: $$f(m, km)=\frac{m^2a^4+ma^4+m^2a^2+ma^2}{4}$$ for which $a=\sinh (n \sinh^{-1} (\sqrt{m}))$.

Triangular Numbers

By looking at the formula for $f(m, km)$, it equals to the product of two triangular numbers. This may be a new way to solve this problem, but I do not have any progress on this.

Joe
  • 534
  • 13
  • 4
    A trivial family of solutions has $k=1$. Also, if $m=1$, then the problem reduces to the simpler problem of finding the square triangular numbers, of which the solution is well-known. – Geoffrey Trang Oct 11 '23 at 16:33

1 Answers1

3

Your question is related to Pell equations by the following result:

Theorem. Fix $m \in \mathbb{N}$. The values of $k$ for which $f(m, km)$ is a perfect square are exactly those of the form $$ k = \frac{i-1}{2m} $$ where $i$ comes from any solution $(i, j)$ to the instance of Pell's equation given by $$ i^2 - 4m(m+1)j^2 = 1. \tag{1} $$

That is, given $m$, the valid $k$ correspond exactly to solutions of an instance of Pell's equation with parameter dependent on $m$. Intuitively one might expect this to be the case by extrapolating from $m = 1$, where (as noted by Geoffrey Trang) solutions correspond to square-triangular numbers which in turn correspond to solutions to a specific Pell's equation.

After proving this Theorem, we'll use the theory linking Pell equations and Chebyshev polynomials to prove your conjecture about the $\sinh$ sequence.


We'll need the following technical lemma, which I originally posted as a conjecture on MSE in the process of solving your problem.

Lemma. Suppose $k(m+1)(km+1)$ is a perfect square. Then $(m+1) \mid k(km+1)$.

Proof. If $m+1$ is squarefree, then this follows from the fact that primes in perfect squares occur in even multiplicities. The general case is highly nontrivial; see the beautiful proof by Mastrem using Vieta jumping on my MSE post. $\square$

Proof of the Theorem

The core argument below is due to a very clever friend of mine who shared her solution with me offline; I'm just writing it up.

Proof. Fix $m \in \mathbb{N}$. We first prove that, if $k$ is such that $f(m, km)$ is a perfect square, then it must be the case that $$ k = \frac{i-1}{2m} $$ where $i$ is a solution to $i^2 - 4m(m+1)j^2 = 1$. Conversely, we then show that for any such $i$, taking $k$ as above yields a positive integer such that $f(m, km)$ is a perfect square.

$(\Longrightarrow)$ Let $k \in \mathbb{N}$ be arbitrary such that $$ f(m, km) = \frac{m^2k(m+1)(km+1)}{4} $$ is a perfect square. Then $k(m+1)(km+1)$ must also be a perfect square, so write $$ k(m+1)(km+1) = s^2 \quad\text{for some $s \in \mathbb{N}$}. \tag{2} $$ Expanding (2) and rewriting as a quadratic in $k$, we obtain $$ k^2m^2 + km + k^2m + k = s^2 \implies m(m+1)k^2 + (m+1)k - s^2 = 0. $$ The quadratic equation gives $$ k = \frac{-(m+1) + \sqrt{(m+1)^2 + 4m(m+1)s^2}}{2m(m+1)} $$ where we can ignore the negative branch of the $\pm$ since $k$ is a positive integer by assumption. Now, consider the square root of the discriminant $\sqrt{D} = \sqrt{(m+1)^2 + 4m(m+1)s^2}$. Since $k$ is a positive integer, we see that $\sqrt{D}$ must be a positive integer divisible by $(m+1)$. Thus take $i \in \mathbb{N}$ such that $$ \sqrt{D} = \sqrt{(m+1)^2 + 4m(m+1)s^2} = i(m+1), \tag{3} $$ and note that we can express $$ k = \frac{-(m+1) + \sqrt{D}}{2m(m+1)} = \frac{-(m+1) + i(m+1)}{2m(m+1)} = \frac{i-1}{2m}. $$

Now, squaring both sides of Equation 3 yields $$ (m+1)^2 + 4m(m+1)s^2 = i^2(m+1)^2. $$ This almost looks like a Pell's equation! To get it in the right form, apply the Lemma to $k(m+1)(km+1) = s^2$ to get $m+1 \mid k(km+1)$, so that $(m+1)^2 \mid s^2$ and hence $m+1 \mid s$. Then put $s = j(m+1)$ for some $j \in \mathbb{N}$; we get $$ (m+1)^2 + 4m(m+1)j^2(m+1)^2 = i^2(m+1)^2. $$ Dividing through by $(m+1)^2$ on both sides and rearranging gives the true Pell's equation $$ 1 + 4m(m+1)j^2 = i^2 \implies i^2 - 4m(m+1)j^2 = 1. $$ This argument shows that, for any $k$ such that $f(m, km)$ is a perfect square, there exist $(i, j)$ such that $k = (i-1)/(2m)$ and $i^2 - 4m(m+1)j^2 = 1$.


$(\Longleftarrow)$ Next, we prove that, given any such $i$, taking $k = (i-1)/(2m)$ yields a positive integer such that $f(m, km)$ is a perfect square. Let $(i, j)$ be a solution to $$ i^2 - 4m(m+1)j^2 = 1. $$ We need to show that $k = (i-1)/(2m)$ is an integer, and that $m^2k(m+1)(km+1)/4$ is a perfect square. Ignore $m^2/4$ for the moment and substitute $(i-1)/(2m)$ for $k$ in $k(m+1)(km+1)$; direct computation shows that $$ k(m+1)(km+1) = \frac{i-1}{2m}(m+1)\left(\frac{i-1}{2m}m + 1\right) = (i^2 - 1)\frac{m+1}{4m}. $$ On the other hand, multiplying both sides of $i^2 - 4m(m+1)j^2 = 1$ by $(m+1)$ yields \begin{align*} &i^2(m+1) - 4m(m+1)^2j^2 = m+1 \\ &\quad\implies (j(m+1))^2 = (i^2 - 1)\frac{m+1}{4m} \end{align*} where, per the previous computation, the right side is exactly $k(m+1)(km+1)$. Hence $$ k(m+1)(km+1) = (j(m+1))^2 $$ is a perfect square, and moreover $$ f(m, km) = \frac{m^2k(m+1)(km+1)}{4} = \left(\frac{m(m+1)j}{2}\right)^2 $$ is an integer since one of $m$, $m+1$ is divisible by $2$, and certainly is a perfect square.

It remains only to justify that $k = (i-1)/(2m)$ is always a positive integer. Recall that $i$ is a solution to $i^2 - 4m(m+1)j^2 = 1$, which is a Pell's equation with fundamental solution $(i_1, j_1) = (2m+1, 1)$. The theory of Pell equations tells us that the sequence of solutions $(i_\ell, j_\ell)$ is generated by the recurrence $$ i_\ell = (2m+1)i_{\ell - 1} + 4m(m+1)j_{\ell -1}. $$ Working mod $2m$, the second term vanishes and we are left with $i_\ell \equiv i_{\ell - 1} \pmod{2m}$. A trivial induction argument then shows that every solution $i$ satisfies $$ i \equiv i_1 \equiv 2m+1 \equiv 1 \pmod{2m} $$ implying that $2m \mid (i-1)$. We therefore conclude that $k = (i-1)/(2m)$ is always an integer, which finishes the proof. $\square$

Connections to Chebyshev polynomials and A082649

In the OP, a relationship to https://oeis.org/A082649, the triangle of coefficients in the expansion of $\sinh^2(nx)$ in powers of $\sinh(x)$, is conjectured. In this section, I discuss how everything is connected.

Chebyshev polynomials. We first link the sequence of $k$ to Chebyshev polynomials. For fixed $m$, let $k_n$ denote the $n$th smallest value of $k$ for which $f(m, km)$ is a perfect square. It follows from the Theorem that $k_n = (i_n - 1)/(2m)$, where $i_n$ is the $n$th solution of the Pell's equation $i^2 - 4m(m+1)j^2 = 1$. On the other hand, it is known that the Chebyshev polynomials $T_n$, $U_n$ manifest as solutions of a Pell's equation of the same form; in particular, they satisfy $$ T_n(x)^2 - (x^2 - 1)U_{n-1}(x)^2 = 1. $$ Setting $x = 2m+1$ so that $4m(m+1) = x^2 - 1$, it is straightforward to show that $i_n = T_n(2m+1)$.

Substituting into $k_n = (i_n - 1)/(2m)$ we thus see that, for fixed $m$, the $n$th smallest value of $k$ for which $f(m, km)$ is a perfect square is given by $$ k_n = \frac{T_n(2m+1) - 1}{2m} $$ where $T_n$ is the $n$th Chebyshev polynomial of the first kind.

The $S_r$ sequence. Let me remark that from this expression for $k_n$, we easily obtain a connection to another interesting sequence on OEIS. In particular, https://oeis.org/A092184 defines a family of sequences $S_r$ given by $$ S_r(n) = 2\frac{T_n((r-2)/2) - 1}{r-4}. $$ Setting $r = 4m+4$, we obtain $$ S_{2m+4}(n) = 2\frac{T_n(2m+1) - 1}{4m} = \frac{T_n(2m+1) - 1}{2m} $$ which is precisely $k_n$! That is, for fixed $m$, the sequence of $k$ that work is exactly the member of the family of sequences $S_r$ with $r = 4m+4$.

The sinh sequence. Finally, let us prove the connection to https://oeis.org/A082649. The observation in the OP is that, given $m$, the $n$th smallest value of $k$ appears related to the coefficients of the expansion of $\sinh^2(nx)$ in powers of $\sinh(x)$. For instance, given $n = 3$, we have the expansion $$ \sinh^2(3x) = 16\sinh^6 x + 24\sinh^4 x + 9\sinh^2 x. $$ If we replace each occurrence of $\sinh^2 x$ with $m$ and shift the powers down, we obtain $16m^2 + 24m + 9$ which happens to correspond to the $n=3$ smallest value of $k$. It is not hard to see that a rigorous formulation of this claim is that $$ k_n = \frac{T_n(2m+1) - 1}{2m} \stackrel{?}{=} \frac{\sinh^2(n\sinh^{-1}(\sqrt{m}))}{m}. $$ To prove this identity, set $t := \sinh^{-1}(\sqrt{m})$ so that $m = \sinh^2 t$. Then, working from the left side, we see that \begin{align*} \frac{T_n(2m+1) - 1}{2m} &= \frac{T_n(2\sinh^2 t + 1) - 1}{2m} \\ &= \frac{T_n(\cosh(2t)) - 1}{2m} \\ &= \frac{\cosh(2nt) - 1}{2m} \\ &= \frac{2\sinh^2(nt)}{2m} \\ &= \frac{\sinh^2(n\sinh^{-1}\sqrt{m})}{m} \end{align*} precisely as claimed, where we used standard hyperbolic trig identities on lines 2 and 4, and the Chebyshev polynomial identity $T_n(\cosh(\theta)) = \cosh(n\theta)$ on line 3. This concludes the proof of the connection to https://oeis.org/A082649, and resolves the original (very cute) problem in full.

Joe
  • 534
  • 13