For a finite set $C$ of integer numbers, we define $S(C)$ as the sum of the elements of $C$. Find two non-empty sets $A$ and $B$ whose intersection is empty, whose union is the set $\{1,2,\ldots, 2021\}$ and such that the product $S(A)S(B)$ is a perfect square.
Problem
Source: 2021 Iberoamerican Mathematical Olympiad, P5
Tags: sets of integers, Intersection, union
21.10.2021 02:47
The version I saw said "whose intersection is empty"?
21.10.2021 02:54
jampm wrote: The version I saw said "whose intersection is empty"? Thanks! Fixed.
21.10.2021 03:10
Take $S(A)=3 \cdot 2021 \cdot 9^2$. Clearly, \[ S(A)S(B)=(3 \cdot 2021 \cdot 9^2)(2021-3 \cdot 2021 \cdot 9^2)=(2021 \cdot 3 \cdot 9 \cdot 16)^2 \]is square. The costruction for $A$ follows thusly, $\{ 2021, 1, 2020, 2, 2019,...,242,1779 \}$ and $B$ is the compliment of $A$.
21.10.2021 12:33
jbaca wrote: For a finite set $C$ of integer numbers, we define $S(C)$ as the sum of the elements of $C$. Find two non-empty sets $A$ and $B$ whose intersection is empty, whose union is the set $\{1,2,\ldots, 2021\}$ and such that the product $S(A)S(B)$ is a perfect square. Firstly, we need \[a(1011\cdot2021-a)=k^2\]to have solutions. We will put \(a=2021*b\) because we can choose a subset \(A\) consisting of \(2b\) elements so that there are \(b\) distinct pairs that sum to \(2021\). From this, we get that \[b(1011-b)=l^2\]Now we will do \(b=3c\), because by quadratic discriminants and general sol to Primitive Pythagorean triples, we see that \(1011\) should be sum of two squares which is impossible, but the following substitution makes it easier to handle. Then, we get the equation \[c(337-c)=h^2\]which has the solution \(c=9^2\). So, \(b=3\cdot9^2\) and \(a=2021\cdot3\cdot9^2\) and since we can always choose a set of \(2\cdot3\cdot9^2\) elements such that there exist \(3\cdot9^2\) distinct pairs who sum to \(2021\), we are done.
23.10.2021 03:59
23.10.2021 04:52
Use \begin{align*} B &= \left\{ 1, 2, 3, \dots, 243, 1778, 1779, \dots 2020 \right\} \\ A &= \left\{ \text{everything else} \right\}. \\ \implies S(B) &= 9^2 \cdot 6063 = 243 \cdot 2021 \\ S(A) &= 16^2 \cdot 6063. \end{align*}Here we were motivated by the deep fact that \[ S(A) + S(B) = 1 + 2 + \dots + 2021 = 1011 \cdot 2021 \]with $337 = 9^2+16^2$ being the only $1 \bmod 4$ prime factor in the right hand side. Remark: One can show that in fact $S(A)$ and $S(B)$ must be equal to $9^2 \cdot 6063$ and $16^2 \cdot 6063$ via Fermat's Christmas theorem.
23.04.2022 04:24
Gracias por el nuevo teorema para mi lista
24.11.2022 22:43
a dum problme Note that $S(A)+S(B)=2021\cdot1011=3\cdot43\cdot47\cdot337$. Now let $S(A)=3\cdot43\cdot47\cdot9^2$, so $S(B)=3\cdot43\cdot47\cdot16^2$, and as such $S(A)S(B)=(3\cdot43\cdot47\cdot9\cdot16)^2$. It remains to show that we can in fact achieve the desired value of $S(A)$. In fact, I claim that for every $0 \leq n \leq 2021\cdot1011$, there exists some $T \subseteq [2021]:=\{1,\dots,2021\}$ with $S(T)=n$. Clearly the empty set works for $n=0$. Now suppose that for some $n<2021\cdot1011$, there exists such a subset $T$, but there doesn't exist a subset $T'$ for $n+1$. If $1 \not \in T$, then we can just let $T'=T\cup \{1\}$. If we have some $2021>k \in T$ but $k+1 \not \in T$, then let $T'=(T \cup \{k\}) \setminus \{k+1\}$. If neither of these criteria are true, then we have $T=S$ (since $1 \in T \implies 2 \in T \implies \dots$), which is absurd. Thus we can pick a subset $A$ of $[2021]$ with the desired value of $S(A)$, and just pick $B=[2021] \setminus A$ as desired. $\blacksquare$
30.05.2023 21:46
Let $x$ be the sum of $A$. We are looking for an $x$ such that $$x(2021\triangle -x)$$is a perfect square. We want $$\frac{x}{2021\triangle-x}=\frac{a}{b}$$for relatively prime positive integers $a$ and $b$ such that $a+b$ divides $2021\triangle$ and $ab$ is a perfect square. Using our wishful thinking, we look into the case where $a$ and $b$ are both perfect squares. $2021\triangle$ has a prime factor $337$, which is a sum of two squares $$337=256+81.$$Thus, if $a=81$ and $b=256$, we have $$x=\frac{81}{337}(2021\triangle).$$For a construction, divide the nonnegative integers up to 2021 (0 included as filler, it doesn't do anything) into six consecutive groups of 337. In each group of 337, pick 81 of them so that the ones that are picked are symmetric around the center of the group of 337, and put those in $A$. This clearly makes the sum of $A$ exactly $81/337$ of the total sum, so we are done.
04.08.2023 09:32
Choose $A$ such that $S(A) = 3\cdot 2021\cdot 81$, and then it follows that choosing $B$ to be all the elements in $\{1,2,\ldots, 2021\}$ not in $A$, we have \[S(B) = (1 + 2 + \cdots 2021) - 3\cdot 2021\cdot 81 = 3\cdot 2021\cdot 256,\]so \[S(A)S(B) = 3^2 \cdot 2021^2 \cdot 9^2 \cdot 16^2,\]which is a perfect square. It remains to show that such $A$ exists. Consider $A = \{1, 2, 3, \ldots, 242, 1779, 1780, \ldots, 2020, 2021\}$. The sum of elements in this set is \[ 2021 + (1 + 2020) + (2 + 2019) + \cdots + (242 + 1779) = 243\cdot 2021 = 3\cdot 2021\cdot 81,\]as desired. In this case, we would have $B = \{243,244,\ldots, 1778\}$.
15.11.2023 17:27
Note that $S(A) + S(B) = 2021 \cdot 1011$. Since $337$ divides this term and $16^2 + 9^2 = 337$, taking $S(A) = 16^2 \cdot 2021 \cdot 3$ and $S(B) = 9^2 \cdot 2021 \cdot 3$. A construction by discrete continuity is evidently possible.
11.04.2024 11:35
What is this? Let $S(A) = k$. Then $k(2021 \cdot 1011 - k)$ is a perfect square. Let $x^2 = k(2021 \cdot 1011 - k)$. Then $k = \frac{2021 \cdot 1011 - \sqrt{(2021\cdot 1011)^2 - 4x^2}}{2}$. Note that $2021 \cdot 1011 = 43 \cdot 47 \cdot 3 \cdot 337$ and $43 \equiv 47 \equiv 3 (4)$, so the only way to write $2021 \cdot 1011$ into a form $d(m^2 + n^2)$ is $6063(16^2 + 9^2)$. So the only value $\sqrt{(2021\cdot 1011)^2 - 4x^2}$ can take is $6063(16^2 - 9^2)$. Thus $k = \frac{2021 \cdot 1011 - 6063 \cdot 175}{2} = 2021 \cdot 243$ and we can take $A = \{1, 2020, 2, 2019, \dots, 243, 1778\}$ and it satisfies the problem condition. $\blacksquare$
21.06.2024 03:33
$A = \{1, 2020\} \cup \{2, 2019\} \cup \cdots \cup \{243, 1778\}$ and $B = [2021] \setminus A$ works, as $S(A) = 81 \cdot 3 \cdot 2021$ and $S(B) = 256 \cdot 3 \cdot 2021$. Remark: The point is to essentially set $S(B) = \frac{b^2}{a^2} S(A)$, from where we just need to solve $a^2+b^2 = 1011 \cdot 2021$, which decomposes into $a^2+b^2 = 337$.
08.01.2025 06:57
$A=\{1,2,\dots,241,242,2021-242,2021-241,\dots,2021-2,2021-1,2021\}$ has sum $S(A)=2021\cdot 243=2021\cdot 3^5$. $B=\{243,244,\dots,2021-244,2021-243\}$ has sum $S(B)=2021\cdot 768=2021\cdot 3\cdot 2^8$. The product of these sums is $S(A)S(B)=2021^2\cdot 3^6\cdot 2^8=(2021\cdot 3^3\cdot 2^4)^2$, which is a perfect square, as desired. just posting the construct is kinda useless tho so here's how i found it the total sum of $\{1,2,\dots,2021\}$ is $S(A)+S(B)=\frac{2021\cdot 2022}2=2021\cdot 1011$ if $S(A)-S(B)=d$, then we want $(\frac{2021\cdot 1011}2)^2-(\frac{d}2)^2=k^2$ for some nonzero integer $k$. we can simplify this into $(2021\cdot1011)^2=(2k)^2+d^2$. we remember the parameterization for primitive pythag triples $(m^2+n^2)^2=(2mn)^2+(m^2-n^2)^2$. since $2021\cdot1011=3\cdot 43\cdot 47\cdot 337$, we want $(m^2+n^2)|(3\cdot 43\cdot 47\cdot 337)$ by playing around a little, we get that $m=16, n=9$ gives $337=16^2+9^2$ so $337^2=288^2+175^2$ we scale each number up by $2021\cdot 3$ to get that $d=2021\cdot 525$. from here it is easy to see that $S(A)=2021\cdot 768$ and $S(B)=2021\cdot 243$, and finding the construct is just pairing.