Puzzles
Square pairs
Source: Maths Jam
Can you order the integers 1 to 16 so that every pair of adjacent numbers adds to a square number?
For which other numbers \(n\) is it possible to order the integers 1 to \(n\) in such a way?
Show answer
Hide answer
Yes: 8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9, 16.
It is clearly possible for the numbers 1 to 15 (remove the 16 from the end of the sequence above) and 1 to 17 (add 17 to the start of the sequence above).
The OEIS sequence
A090461 gives other numbers for which this is possible. It starts 15, 16, 17, 23, then includes every number from 25 onwards. It is conjectured, but not proven, that it is possible for every number above 25.
Square factorials
Multiply together the first 100 factorials:
$$1!\times2!\times3!\times...\times100!$$
Find a number, \(n\), such that dividing this product by \(n!\) produces a square number.
Show answer & extension
Hide answer & extension
First, look at how many times each number will appear in the product.
$$1!\times2!\times3!\times...\times100!
=1^{100}\times2^{99}\times3^{98}\times...\times100^1$$
Now split the odd and even numbers.
$$=\left[1^{100}\times3^{98}\times...\times99^2\right]\times\left[2^{99}\times4^{97}\times...\times100^1\right]$$
As all the powers in the first bracket are even, the first bracket is a square number.
$$=\left[1^{50}\times3^{49}\times...\times99^1\right]^2\times\left[2^{99}\times4^{97}\times...\times100^1\right]$$
Next, take a factor of two out of each number in the second bracket.
$$=\left[1^{50}\times3^{49}\times...\times99^1\right]^2\times\left[(2\times1)^{99}\times(2\times2)^{97}\times...\times(2\times50)^1\right]$$
$$=\left[1^{50}\times3^{49}\times...\times99^1\right]^2\times2^{99+97+...+1}\left[1^{99}\times2^{97}\times...\times50^1\right]$$
$$=\left[1^{50}\times3^{49}\times...\times99^1\right]^2\times2^{2500}\left[1^{99}\times2^{97}\times...\times50^1\right]$$
The only odd powers involved are now in the last bracket. Dividing by \(50!\) would make each of these powers even, hence the overall number would be square.
$$\frac{1!\times2!\times3!\times...\times100!
}{50!}=\left[1^{50}\times3^{49}\times...\times99^1\right]^2\times2^{2500}\left[1^{98}\times2^{96}\times...\times50^0\right]$$
$$=\left[1^{50}\times3^{49}\times...\times99^1\times2^{1250}\times1^{49}\times2^{48}\times...\times50^0\right]^2$$
Extension
For which numbers \(m\) is it possible to find a number \(n\) such that $$\frac{1!\times2!\times...\times m!}{n!}$$ is a square number?
Lots of ones
Is any of the numbers 11, 111, 1111, 11111, ... a square number?
Show answer
Hide answer
No. If one of them were a square number, then its square root must end in 1 or 9 (as this is the only way to make the final digit a one). So the square root is of the form \(10n\pm1\).
$$111...1=(10n\pm1)^2$$$$=100n^2\pm20n+1$$
$$=10(10n^2\pm2n)+1$$
If \(10(10n^2\pm2n)+1\) is of the form 111...1, then \(10n^2\pm2n\) is also of the form 111...1 (as it has just had the final 1 taken off). But \(10n^2\pm2n\) is even and 111...1 is odd, so this is not possible.
22 December
What is the largest number which cannot be written as the sum of distinct squares?
Products and sums of squares
Show that the product of any two numbers, each of which is the sum of two square integers, is itself the sum of two square integers.
Show answer & extension
Hide answer & extension
The result of the multiplication can be written as:
$$(a^2+b^2)(c^2+d^2)$$
where \(a\), \(b\), \(c\) and \(d\) are integers. Expanding the brackets gives:
$$a^2c^2+b^2c^2+a^2d^2+b^2d^2$$
Next, if \((bd-ac)^2\) and \((bc+ad)^2\) are expanded, we get:
$$(bd-ac)^2=b^2d^2+a^2c^2-2abcd$$
$$(bc+ad)^2=b^2c^2+a^2d^2+2abcd$$
And so:
$$(a^2+b^2)(c^2+d^2)=(bd-ac)^2+(bc+ad)^2$$
We have written the product as the sum of two integers.
Extension
For which integers \(a\), \(b\), \(c\) and \(d\) can the result \((a^2+b^2)(c^2+d^2)\) be written as the sum of two square integers in more than one way?
Odd squares
Prove that 1 and 9 are the only square numbers where all the digits are odd.
Show answer & extension
Hide answer & extension
If \(n^2\) has all odd digits then the units digit of \(n\) must be odd. It can be checked that \(n\) cannot be a one digit number (except 1 or 3 as given in the question) as the tens digit will be even.
Therefore \(n\) can be written as \(10A+B\) where \(A\) is a positive integer and \(B\) is an odd positive integer.
$$n^2=(10A+B)^2\\=100A+20AB+B^2$$
Now consider the tens digit of this.
\(100A\) has no effect on this digit. The tens digit of \(20AB\) will be the units digit of \(2AB\) which will be even. The tens digit of \(B^2\) is even (as checked above). Therefore the tens digit of \(n^2\) is even.
Hence 1 and 9 are the only square numbers where all the digits are odd.
Extension
For which bases is this not true?
Triangles between squares
Prove that there are never more than two triangle numbers between two consecutive square numbers.
Show answer & extension
Hide answer & extension
Let \(T_a\) represent the \(a\)th triangle number. This means that \(T_a=\frac{1}{2}a(a+1)\).
Suppose that for some integer \(n\), \(n^2 \leq T_a <(n+1)^2\). This means that:
$$n^2 \leq T_a$$
$$n^2 \leq \frac{1}{2}a(a+1)$$
$$2n^2 \leq a^2+a$$
But for every positive integer \(a \leq a^2\), so:
$$2n^2 \leq 2a^2$$
$$n^2 \leq a^2$$
\(n\) and \(a\) are both positive integers, so:
$$n \leq a$$
Now consider \(T_{a+2}\):
$$T_{a+2}=\frac{1}{2}(a+2)(a+3)$$
$$=\frac{1}{2}(a^2+5a+6)$$
$$=\frac{1}{2}(a^2+a)+\frac{1}{2}(4a+6)$$
$$=\frac{1}{2}a(a+1)+2a+3$$
$$=T_a+2a+3$$
We know that \(a \geq n\) and \(T_a \geq n^2\), so:
$$T_a+2a+3 \geq n^2+2n+3$$
$$>n^2+2n+1 = (n+1)^2$$
And so \(T_{a+2}\) is not between \(n^2\) and \((n+1)^2\). So if a triangle number \(T_a\) is between \(n^2\) and \((n+1)^2\) then the next but one triangle number \(T_{a+2}\) cannot also be between \(n^2\) and \((n+1)^2\). So there cannot be more than two triangle numbers between \(n^2\) and \((n+1)^2\).
Extension
Given an integer \(n\), how many triangle numbers are there between \(n^2\) and \((n+1)^2\)?
Square numbers
Towards the end of his life, Lewis Carroll recorded in his diary that he had discovered that double the sum of two square numbers could always be written as the sum of two square numbers. For example
$$2(3^2 +4^2 )=1^2 +7^2$$
$$2(5^2 +8^2 )=3^2 +13^2$$
Prove that this can be done for any two square numbers.
Show answer & extension
Hide answer & extension
Let \(a^2\) and \(b^2\) be the two square numbers.
$$2(a^2 +b^2 ) = 2a^2 +2b^2$$
$$= a^2 + 2ab + b^2 + a^2 - 2ab + b^2$$
$$= (a+b)^2 +(a-b)^2$$
Extension
Prove that 3 times the sum of 3 squares is also the sum of 4 squares.