Determine all positive integers $d,$ such that there exists an integer $k\geq 3,$ such that One can arrange the numbers $d,2d,\ldots,kd$ in a row, such that the sum of every two consecutive of them is a perfect square.
Problem
Source: Bulgaria National Olympiad 2019
Tags: number theory
20.04.2019 19:20
The answer is all perfect squares. Firstly, observe that $d$ works iff $dx^2$ works. Therefore, it suffices to find all squarefree positive integers $d$ which work. If $p \ge 2$ divides $d$, then we'll claim that there doesn't exist such a positive integer $k$. If $p = 2$, then simply note that if $a_1, a_2, \cdots, a_k$ were a permutation of $1, 2, \cdots, k$ which worked, then $a_j+a_{j+1}$ must be even for all $j$ and so the $a_i$'s are of the same parity, which is clearly impossible when $k \ge 3.$ For $p \ge 3$, a similar statement holds that $p|a_j + a_{j+1}$ for all $j$, and so either $p$ divides all of the $a_i$'s or none of them, implying that $k < p$. Hence, $p = 3$ fails as $k \ge 3$. When $p \ge 5$, if we let $a_t = 1$, then we can easily see that all $a_i$'s are $\equiv \pm 1$ (mod $p$), also impossible. Now, it suffices to construct an example when $d = 1$. The following suffices: $$17, 8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9, 16,$$ and so the answer is all perfect squares. $\square$
21.04.2019 22:23
Pathological wrote: then $a_j+a_{j+1}$ must be even for all $j$ and so the $a_i$'s are of the same parity I don't think this is correct... this simply means that the parity is the same for every even and every odd term. I think the argument can be continued, but I'm not sure...
21.04.2019 22:58
Well we’re assuming that $d$ is squarefree, so in your case that would make $(a_i+a_{i+1})d$ congruent to $2$ mod $4$, clearly not a square.
22.04.2019 02:53
I don't understand how you are defining the $a_i$...
22.04.2019 03:08
benstein wrote: I don't understand how you are defining the $a_i$... Pathological wrote: If $p = 2$, then simply note that if $a_1, a_2, \cdots, a_k$ were a permutation of $1, 2, \cdots, k$ which worked What I mean by "worked" here is that $a_1d, a_2d, a_3d, \cdots, a_kd$ is a permutation of $d, 2d, \cdots, kd$ for which the sum of adjacent terms is always a perfect square.
22.04.2019 23:19
Oh, I understand now, thanks for clarifying. That was not immediately clear...
07.07.2020 17:31
First observation is that, if $d$ works then $dx^2$ also works.Hence WLOG $d$ is square-free. Now,assume we have $ld$ to the right (or left) of $d$.Then,$l \equiv -1 \pmod{d}$. Again assume $md$ is to the right $(k \ge 3)$ .Then, $m \equiv +1 \pmod{d}$. Hence its easy to see that only $-1,1 \pmod{d}$ appears in coefficients of $d$ in this sequence.But unless $d=1$ thats impossible i.e. that doesn't satisfy our problem condition. Hence,the only possible option left is when $d$ is a perfect square i.e. its square free part is $1$. The construction is given by the user pathological in above post.
12.04.2021 01:51
The answer is all square numbers. Notice the degree of freedom in the sense of scaling. This means that we can reduce our argument onto all integers $d$ such that $v_p(d) \leq 1$, for any prime $p$. Let $a_1,a_2,\dots ,a_k$ be a permutation of the numbers $1,2,\dots, k$, such that $d\left( a_i + a_{i+1} \right) = t_i^2$, where $t_i$ is an integer. Let $p$ be a prime number such that $p \mid d$, this implies that for every $i$ we must have that $a_i+a_{i+1} \equiv 0 \pmod{p}$. But this implies the following: $$a_1 \equiv a_3 \equiv \dots \equiv a_{1+2t} \pmod{p}$$$$a_2 \equiv a_4 \equiv \dots \equiv a_{2t} \pmod{p}$$For any $t$ as long as $2t+1 \leq k$. But this practically impossible since we must have the numbers $1,2,3$ (since $k \geq 3$). Meaning that $d=1$. Now we just find the construction when $d=1$. Notice that the sequence: $$17,8,1,15,10,6,3,13,12,4,5,11,14,2,7,9,16$$has the property that is needed for the problem. Thus we have our sequence for $d=1$. By our scaling freedom, we scale by any square to get that $d=t^2$, where $t$ is an arbitrary integer.
08.12.2021 23:07
k.vasilev wrote: Determine all positive integers $d,$ such that there exists an integer $k\geq 3,$ such that One can arrange the numbers $d,2d,\ldots,kd$ in a row, such that the sum of every two consecutive of them is a perfect square. I claim that the answer is all perfect squares. First, I will prove that any $d$ which satisfies the condition must be a perfect square. Then, I will prove that every perfect square is a solution. Let the numbers $d,2d,\dots , kd$ be rearranged as $a_1,a_2,\dots,a_k$ in a row, and let $b_j=\frac{a_j}{d}$ for every $1\leq j\leq k$. Now, let $d=p_1^{\alpha_1}\cdot p_2^{\alpha_2}\cdots p_n^{\alpha_n}$ be the decomposition of $d$ in primes. Let's suppose $d$ isn't a perfect square. Then, WLOG, $\alpha_1$ is odd. Then, it is satisfied $$ a_i+a_{i+1}\equiv 0\mod p_1^2 \thickspace \Longrightarrow \thickspace b_i+b_{i+1}\equiv 0\mod p_1 \thickspace \forall \thickspace 1\leq i\leq k-1 $$That is, $$ b_1+b_2\equiv b_2+b_3\equiv \dots \equiv b_{i-1}+b_i\equiv 0\mod p_1 $$Hence, $$ \left\{\begin{array}{lll} b_1\equiv b_3\equiv \dots \mod p_1 \\ b_2\equiv b_4\equiv \dots \mod p_1 \\ \end{array} \right. $$This implies that the elements of the set $\{b_1,b_2,\dots ,b_k\}=\{1,2,\dots, k\}$ have only two different congruences modulo $p_1$. Since $k\geq 3$, then the only possible value for $p_1$ is $p_1=2$. In other words, the only possible prime $p$ such that $v_p(d)$ is odd is $p=2$. However, I claim that $v_2(d)$ must be even. The set $\{1,2,\dots,k\}$ contains at least an even and an odd element. Therefore, the permutation $b_1,b_2,\dots,b_k$ contains at least a pair of consecutive numbers $(b_i,b_{i+1})$ such that one of them is odd and the other one is even, implying $b_i+b_{i+1}\equiv 1\mod 2$. Let's suppose $v_2(d)$ was odd. Then, $$ b_1+b_2\equiv b_2+b_3\equiv \dots \equiv b_{k-1}+b_k\equiv 0\mod 2 $$We have reached a contradiction, and hence we have proved that there doesn't exist any prime $p$ such that $v_p(d)$ is odd. In other words, $d$ must be a perfect square. Now, let's prove that any perfect square is a solution. Let $d=m^2$ be a perfect square. Then, there exists an integer $k=15$ such that the numbers $d,2d,\dots, 15d$ can be arranged in a row, such that the sum of any two consecutive numbers is a perfect square. In particular, the numbers can be arranged as follows: $$ 8d, \, d, \, 15d, \, 10d, \, 6d, \, 3d, \, 13d, \, 12d, \, 4d, \, 5d, \, 11d, \, 14d, \, 2d, \, 7d, \, 9d $$It is easy to check that such arrangement works, and so the answer is all perfect squares.
01.10.2023 11:46
26.05.2024 17:20
This strongly reminded me of 24BSLC2. I don't think they're very similar but having done that problem strongly motivated the solution, especially the construction for $n=1$ here. The answer is all integers $d$ such that $d$ is a perfect square. We say an integer $d$ is good if it satisfies the desired conditions. It is not hard to see that an integer $d$ is good if and only if $p^2d$ is good, for any prime $p$ since the sum of any pair of consecutive terms of a sequence of the given form for $p^2d$ is divisible by $p^2$. Thus, in order for the sum to be a square, the sum of the terms, divided by $p^2$ must also be a square. Now, we simply need to check which $d$ are good for square-free $d$. If $d=1$, it is in fact good. To see why consider the following construction. \[8,1,15,10,6,3,13,12,4,5,11,14,2,7,9\]Thus, all square $d$ are also good by the previous observation. Now, if $d$ is not 1, and is square free, it is a product of distinct primes, i.e $d=p_1p_2\dots p_k$. Now, say there exists a term in the sequence $d,2d,\dots, kd$ which is divisible by $p_1^2$. If it is ever a neighbor of a term which is not divisible by $p_1^2$ (but divisible by $p_1$ clearly), then their sum is divisible by$p_1$ but not $p_1^2$, so it is not a perfect square. Thus, all such terms can only be neighboring to terms divisible by $p_1^2$. But clearly, there exists terms which are not divisible by $p_1^2$ in this sequence, so if there exists a term divisible by $p_1^2$ we have a clear contradiction. Thus, the sequence cannot include a number divisible by $p_1^2$. But note that when $d=p_1p_2\dots p_k$, then its neighboring term is atleast $(p_1p_2\dots p_k)^2-p_1p_2\dots p_k$ since $(p_1p_2\dots p_k)^2$ is the smallest square which is a multiple of $p_1p_2\dots p_k$. If it is greater than $(p_1p_2\dots p_k)^2 - p_1p_2\dots p_k$, then we immediately have that $(p_1p_2\dots p_k)^2$ is in this sequence, which is divisible by $p_1^2$. So, the only possible neighbor for $p_1p_2\dots p_k$ is $(p_1p_2\dots p_k)^2-p_1p_2\dots p_k$. But, note that since one of $p_1p_2\dots p_k$ and $(p_1p_2\dots p_k)^2-p_1p_2\dots p_k$ must have some other neighbor unless $p_1p_2\dots p_k-1=2$, there must exist some term which is atleast \[(2p_1p_2\dots p_k)^2-p_1p_2\dots p_k \geq (p_1p_2\dots p_k)^2\](if it is a neighbour of 1) or \[(2p_1p_2\dots p_k)^2 - (p_1p_2\dots p_k)^2 + p_1p_2\dots p_k > (p_1p_2\dots p_k)^2\](if it is a neighbour of $(p_1p_2\dots p_k)^2-p_1p_2\dots p_k$) which implies that $(p_1p_2\dots p_k)^2$ is in this sequence anyways, so we must have $p_1p_2\dots p_k-1=2$ (then there exists no multiples of $p_1p_2\dots p_k$ between $p_1p_2\dots p_k$ and $(p_1p_2\dots p_k)^2-p_1p_2\dots p_k$) but this implies that the sequence has at most 2 elements, which is again a clear contradiction since we are given that $k\geq 3$. Thus, all the answers are as claimed and we are done.