# Do Langford squares exist?

A Langford sequence is a permutation of the sequence of 2n numbers 1, 1, 2, 2, ..., n, n in which there is one number between the two 1s, there are two numbers between the two 2s, and more generally the two copies of each number k have k numbers in between them. An example would be:

3 1 2 1 3 2

Define a Langford square to be a square matrix such that every row and every column is a Langford sequence. The question is: Do Langford squares exist? If so, what is the smallest size of a Langford square? If they don’t exist, why not?

• I assume you want to rule out the 2-by-2 square of 1's?
– xnor
Mar 28, 2023 at 19:21
• @xnor That wouldn't qualify anyway, as there must be a number between the ones. Mar 28, 2023 at 19:29
• Oh, I see, I'd call that two units apart. I think saying one "number in between" would be clearer.
– xnor
Mar 28, 2023 at 19:34
• @WillOctagonGibson Do you know the answer to this puzzle? Mar 28, 2023 at 20:28
• @DanielMathias A 2-by-2 square of 0's would qualify though. Probably the only possible solution. Mar 29, 2023 at 16:15

Consider the middle two rows of a $$2n \times 2n$$ Langford square. They, like all rows, must contain $$n$$'s. Any $$n$$ must have a partner $$n$$ in its column that's $$n+1$$ spaces above or below it, but that's off the grid for the middle-row $$n$$'s.
• Strictly speaking this only shows that $n\times n$ Langford squares don't exist for even $n$. (But I think it's fairly trivial to extend it to odd $n$ as well.) Mar 29, 2023 at 4:39