Find all positive integers $n$ such that the set $\{n,n+1,n+2,n+3,n+4,n+5\}$ can be partitioned into two subsets so that the product of the numbers in each subset is equal.
Problem
Source: IMO 1970, Day 2, Problem 4
Tags: modular arithmetic, number theory, Product, partition, IMO, IMO 1970
12.11.2005 20:06
We claim that no such $n$ exists. Before we present the proof, we define some notations for the sake of convenience and clarity. Let $A$ denote the set $\{n, n+1, \ldots, n+5 \}$. We denote $f(X)$ as the product of all the elements in $X$, defined only when $X$ is a set whose elements are integers. Solution 1 (a more combinatorial approach): Suppose such an $n$ that can be partitioned exists. Let $A$ be partitioned into subsets $B$ and $C$ such that $f(B) = f(C)$. Note that for a partition to be possible, we must have for each $i \in \{0, 1, \ldots, 5\}$ such that $n+i \equiv 0 \pmod{p}$ for some prime $p$, $\exists j \neq i, j \in \{0, 1, \ldots, 5\}$ satisfying $n+j \equiv 0 \pmod{p}$, since otherwise exactly one of $f(B), f(C)$ is $\equiv 0 \pmod{p}$, which is a contradiction as our assumption that $f(A) = f(B)$ implies $f(A) \equiv f(B) \pmod{p} \forall p$. This immediately restricts the possible prime divisors of the integers in $A$ to $2, 3$, and $5$, since if $\exists$ some prime divisor $p > 5$ dividing $n+i$, we have $n+i+p > n+5$ and $n+i-p<n$, implying none of the remaining integers in $A$ would be $\equiv 0 \pmod{p}$. Since $f(A)$ is a product of six consecutive integers, at most $\lceil \frac{6}{5} \rceil = 2$ of the integers in $A$ are $\equiv 0 \pmod{5}$, and at most $\lceil \frac{6}{3} \rceil =2$ of the integers in $A$ are $\equiv 0 \pmod{3}$. From the above argument, it follows that $\geq 2$ of the integers in $A$ are divisible by $5$, and that $\geq 2$ of the integers in $A$ are divisible by $3$, implying that $A$ has exactly two multiples of $5$ and two multiples of $3$. We note that the two multiples of $5$ are of different parities, and similarly, the two multiples of $3$ are also of different parities. We note also that there are exactly $3$ odd integers in $A$, thus one of them is a multiple of $3$, one of them is a multiple of $5$, implying at least one of them cannot have any odd prime divisors, which forces it to be $1$. This implies $n=1$, but $A = \{1, 2, \ldots, 6 \}$ doesn't work (Contradiction). Solution 2 (a more algebraic approach): Suppose such an $n$ that can be partitioned exists. Let $A$ be partitioned into subsets $B$ and $C$ such that $f(B) = f(C)$. We have $f(A) = {[f(B)]}^2$, a perfect square. We note that there must be $\geq 2$ multiples of $5$, since otherwise we would have exactly one of $f(B), f(C) \equiv 0 \pmod{5}$, which is a contradiction as $f(B) = f(C)$ implies $f(B) \equiv f(C) \pmod{5}$. It follows then that $n \equiv n+5 \equiv 0 \pmod{5}$. We note that $((n+2)^3)^2 < f(A) < ((n+3)^3)^2$, thus $(n+2)^3 < f(B) = f(C) < (n+3)^3$. WLOG, assume $n+2 \in B$. Suppose $n+3 \in B$. We have $n+1 < \frac{(n+2)^2}{n+3} < \frac{f(B)}{(n+2)(n+3)} < \frac{(n+3)^2}{n+2} < n+5$, which implies $\frac{f(B)}{(n+2)(n+3)} = n+4$. Yet, $f(C) = n(n+1)(n+6) < (n+2)(n+3)(n+4) = f(B)$. (Contradiction) Thus $n+3 \in C$. Note that $\frac{f(B)}{n+2} > (n+2)^2$ and that $(n+2)^2 > n(n+4) > n(n+1)$. Note also that both $n$ and $n+5$ cannot be both in the same subset. Thus, $n \not\in B \Rightarrow n \in C, n+5 \in B$. Obviously $(n+2)(n+4)(n+5) > n(n+1)(n+3)$, thus we are left with the only possibility of $(n+1)(n+2)(n+5) = f(B) = f(C) = n(n+3)(n+4)$, which reduces to the equation $n^2 + 7n + 10 = 0$. This has obviously no positive integer solutions. (Contradiction)
13.11.2005 23:49
If any number in the set has a prime in its prime factorisation greater than 5, that prime cannot appear in the factorisation of another number, so we come to a contradiction. So all numbers are of the form $2^n.3^m.5^k$. If there were 6 such consecutive numbers, then modulo 5 our set is $0 1 2 3 4 0$. Now of those 4 non-zero numbers, at most 2 are 0 mod 2, and the other 2 cannot be both 0 mod 3, so at least one of them is not divisible by 2,3 or 5, but is greater than 1 thus has a prime factor greater than 5, contradiction.
16.11.2005 12:55
This is exactly Solution 1 in my earlier post.
16.11.2005 15:44
Ah, I'm sorry I didn't see it were 2 solutions. I thought it was just such a long solution so I didn't read it
17.11.2005 17:32
This problem could be solved in much nicer and more number theory way.... I suppose that those subsets don't have common elements, otherwise it is stupid for solving . So let $M=\{n, n+1,n+2,n+3,n+4,n+5\}$ and $A$ and $B$ are subsets of $M$ s.t. $A\cap B=\phi$ and $A\cup B=M$ and $P(A)=P(B)=y$ where $P(X)$ is product of elements in subset $X$. Prime number $7$ can divide only one or none number from this set, so if $7$ divides some number then $7|P(A)$ and $not(7|P(B))$ so $P(A)$ and $P(B)$ cant be equal, from this we see that $7$ don't divide any number from $M$ which implies that $7|n+6$ and $7|n-1$. Notice that $P(M)=y^2$ and $P(M)\equiv_7 1\cdot 2...\cdot 6\equiv_7 -1$ but square can't be congruent with $-1$ by module $7$ so contradiction!!
17.11.2005 17:40
That's a brillant solution M@re! Well, so we have three different approaches (combinatorial, algebraic, number theoretic) to this problem. Problems like these are beautiful as they can be solved in various ways, but they also make the categorization of problems into combinatorics, algebra, or number theory forums a hard choice. haha..
03.04.2009 11:14
How do we prove the generalized of this problem ? I have seen it from IMO Compendium Page 372 on its Remark. : " Remark. Erdo˝s has proved that a set $ n, n + 1, . . . , n + m$ of consecutive natural numbers can never be partitioned into two subsets with equal products of elements.
20.04.2009 21:27
http://www2.renyi.hu/~p_erdos/1975-46.pdf
23.04.2009 18:12
Sorry to revive, but I have another idea.
Please correct me if I'm wrong.
17.02.2010 22:16
Mod 5 implies that $ n$ and $ n+5$ are in separate subsets. Suppose the subset with $ n$ had four elements, then we require $ n(n+1)(n+2)(n+3) \leq (n+5)(n+4)$ which can only occur for $ n=1$, contradiction. If each set has three elements, we require $ n(n+4)(n+3) \geq (n+5)(n+1)(n+2)$ or $ n(n+4+1)(n+3) > (n+5)(n+1)(n+2)$ or $ n^2+3n > n^2+3n+2$ contradiction.
13.02.2012 13:31
M@re wrote: I suppose that those subsets don't have common elements, otherwise it is stupid for solving . So let $M=\{n, n+1,n+2,n+3,n+4,n+5\}$ and $A$ and $B$ are subsets of $M$ s.t. $A\cap B=\phi$ and $A\cup B=M$ and $P(A)=P(B)=y$ where $P(X)$ is product of elements in subset $X$. Prime number $7$ can divide only one or none number from this set, so if $7$ divides some number then $7|P(A)$ and $not(7|P(B))$ so $P(A)$ and $P(B)$ cant be equal, from this we see that $7$ don't divide any number from $M$ which implies that $7|n+6$ and $7|n-1$. Notice that $P(M)=y^2$ and $P(M)\equiv_7 1\cdot 2...\cdot 6\equiv_7 -1$ but square can't be congruent with $-1$ by module $7$ so contradiction!! This is a valid solution for $7$ replaced by any prime $p\equiv 3\mod 4$. By the way, where's the combinatorics in this problem? Moderator says: indeed.
15.10.2014 12:45
simple solution.If we prove,that one of these numbers,have a prime divisor $ P \ge 7$ than it will be the only one,which is divisible by $ P $.We have exactly $ 3 $ even and $ 3 $ odd numbers,in these $ 3 $ odd number,at most $ 1 $ of them is divisible by $ 3 $ and at most $ 1 $ is divisible by $5$,which means the left odd number is divisible by a prime number,distinct from $ 2,3,5 $,which means it's divisible by $ P \ge 7 $ . q.e.d. so there is no solution
21.10.2014 10:18
HelloWorld wrote: How do we prove the generalized of this problem ? I have seen it from IMO Compendium Page 372 on its Remark. : " Remark. Erdo˝s has proved that a set $ n, n + 1, . . . , n + m$ of consecutive natural numbers can never be partitioned into two subsets with equal products of elements. i think it will have the same solution,that is,there exists such $ P $ prime,which divides only one element of the set
10.12.2015 13:09
At least one of six consecutive numbers is divisible by 5. From the given condition it follows that two numbers must be divisible by 5. These two numbers are necessarily n and n + 5. Therefore n and n + 5 are in distinct subsets. Since n(n + 1) > n + 5, it follows that a required partition cannot be considered with subsets of different cardinality. Thus each subset must contain three numbers. The following possibilities have to be considered: a) {n, n + 2, n + 4} ∪ {n + 1, n + 3, n + 5} b) {n, n + 3, n + 4} ∪ {n + 1, n + 2, n + 5}. In case a), n < n + 1, n + 2 < n + 3 and n + 4 < n + 5. In case b), the condition of the problem gives: n(n + 3)(n + 4) = (n + 1)(n + 3)(n + 5). We obtain n2 + 5n + 10 = 0 and this equation has no real solution.
24.12.2015 16:25
I know contestant in country anywhere solved generalization version.Greece?
31.08.2016 17:32
26.10.2019 22:27
div5252 wrote: At least one of six consecutive numbers is divisible by 5. From the given condition it follows that two numbers must be divisible by 5. These two numbers are necessarily n and n + 5. Therefore n and n + 5 are in distinct subsets. Since n(n + 1) > n + 5, it follows that a required partition cannot be considered with subsets of different cardinality. Thus each subset must contain three numbers. The following possibilities have to be considered: a) {n, n + 2, n + 4} ∪ {n + 1, n + 3, n + 5} b) {n, n + 3, n + 4} ∪ {n + 1, n + 2, n + 5}. In case a), n < n + 1, n + 2 < n + 3 and n + 4 < n + 5. In case b), the condition of the problem gives: n(n + 3)(n + 4) = (n + 1)(n + 3)(n + 5). We obtain n2 + 5n + 10 = 0 and this equation has no real solution. Direct landed from Titu's book
22.06.2020 05:40
Lemma : Let $ p = 4k+3 $ be a prime. Then the set $\mathcal{A} =\{ n,n+1,\dots,n+p-2\} $ cannot be split into two disjoint subsets such that their product are the same. Proof : Suppose on the contrary it is possible to partition $\mathcal{A}$ into two disjoint subsets, $ \mathcal{B}, \mathcal{C} $ such that $ \prod_{x \in \mathcal{B} } x = \prod_{ x \in \mathcal{C} } x = d $ Observe that $\not \exists \ i \in \{0,1,\dots,p-2\} $ such that $ p \ | \ n+i $ If $ p \ | \ n+i $ for some $ i \in \{ 0,1,\dots,p-2\} $ Then by problem condition there must $ \exists \ j \in \{0,1,\dots,p-2\}, j \not= i $ such that $ p \ | \ n+j $ WLOG , let $ i < j $, then $ n+i < n+j < n+i+p $ $ \Rightarrow pm < n+j < p(m+1) $ where $ pm = n+i \Rightarrow p \not | \ n+j $ Hence $ \not \exists \ i \in \{0,1,\dots,p-2\} $ such that $ p \ | \ n+i $ Hence the set $\mathcal{A}$ forms a permutation of $\{1,2,\dots,p-1\} \ ( \mbox{ mod } p ) $ Then $ \left( \prod_{x \in \mathcal{B} } x \right) \left( \prod_{ x \in \mathcal{C} } x \right) = d^2 $ $$ \Rightarrow \prod_{x \in \mathcal{A} } x = d^2 $$$$ \Rightarrow \prod_{i=1}^{p-1} i \equiv d^2 ( \mbox{ mod } p ) \Rightarrow (p-1)! \equiv d^2 ( \mbox{ mod } p ) $$Hence by Wilson's Theorem $ -1 \equiv d^2 ( \mbox{ mod } p ) $ Thus $-1$ is a QR $ \mbox{ mod } p $ hence $ \left( \frac{-1}{p} \right) \equiv 1 ( \mbox{ mod } p ) $ But $ \left( \frac{-1}{p} \right) \equiv ( -1 )^{\frac{p-1}{2}} \equiv -1 ( \mbox{ mod } p ) $( Contradiction ) Hence $ \not \exists \mathcal{B}, \mathcal{C} \subset \mathcal{A} $ such that $ \mathcal{B} \cap \mathcal{C} = \phi $, $ \mathcal{B} \cup \mathcal{C} = \mathcal{A} $ and $ \prod_{x \in \mathcal{B} } x = \prod_{ x \in \mathcal{C} } x $ Hence our lemma is true. This problem is the particular case of $ p=7 $.
14.10.2020 23:45
my solution needs a little hard work: consider the set ${n,n+1,n+2,n+3,n+4,n+5}$ so we now that at least one of them is divisible by $5$ so if there is just one number divisible by $5$ we can't partition the set so there is exactly two numbers divisible by $5$ and obviously those numbers are $n$ and $n+5$ so we put each one in a different partition so now we should solve a bunch of quadratic equations $n\left(n+4\right)\left(n+3\right)=\left(n+5\right)\left(n+1\right)\left(n+2\right)$ ,answers: $n=-\frac{5}{2}+i\frac{\sqrt{15}}{2},\:n=-\frac{5}{2}-i\frac{\sqrt{15}}{2}$ $n\left(n+1\right)\left(n+3\right)=\left(n+5\right)\left(n+4\right)\left(n+2\right)$,answers: $n=\frac{-35+\sqrt{105}}{14},\:n=\frac{-35-\sqrt{105}}{14}$ $n\left(n+1\right)\left(n+4\right)=\left(n+5\right)\left(n+3\right)\left(n+2\right)$,answers: $n=\frac{-27+\sqrt{129}}{10},\:n=\frac{-27-\sqrt{129}}{10}$ $n\left(n+1\right)\left(n+4\right)=\left(n+5\right)\left(n+3\right)\left(n+2\right)$,answers: $n=\frac{-27+\sqrt{129}}{10},\:n=\frac{-27-\sqrt{129}}{10}$ $n\left(n+3\right)\left(n+2\right)=\left(n+5\right)\left(n+1\right)\left(n+4\right)$,answers: $n=\frac{-23+\sqrt{129}}{10},\:n=\frac{-23-\sqrt{129}}{10}$ $n\left(n+4\right)\left(n+2\right)=\left(n+5\right)\left(n+1\right)\left(n+3\right)$,answers:$n=\frac{-23+\sqrt{129}}{10},\:n=\frac{-23-\sqrt{129}}{10}$ so non of them gives an integer solution also it is obvious that $n\left(n+1\right)\left(n+2\right) \leq \left(n+5\right)\left(n+4\right)\left(n+3\right)$ so we don't check the situation $n\left(n+1\right)\left(n+2\right)=\left(n+5\right)\left(n+4\right)\left(n+3\right)$ so it has no solution
15.10.2020 00:28
No $n.$ Clearly $n\equiv 1\pmod{7}$ otherwise one of these terms is divisible by $7$ (and none of the rest are), so one subset is divisible by $7$ and the other isn't. Now note $6!\equiv -1\pmod{7},$ and $A^2\equiv -1\pmod{7}$ has no solutions by exhaustion.
02.02.2021 16:20
Here is a fairly dumb solution. The answer is that there does not exist such an $n$. Consider an arbitrary fixed $n$. Then, taking the entire set $\pmod{n+2}$ we see that we have $\{-2,-1,0,1,2,3\}$. Thus one of the subsets from the partition must be congruent to $0 \pmod{n+2}$. The other subset must be congruent to a number dividing $(-2)(-1)(1)(2)(3)=12 \pmod{n+2}$. However since these subsets should have equal product, it follows that $12 \equiv 0 \pmod{n+2}$. This, along with the fact that $n$ is a positive integer, implies $n \in \{4,6,12\}$. For $n=4$ the set becomes $\{4,5,6,7,8,9\}$. However we see that exactly one of the sets is divisible by $5$ and therefore $n=4$ cannot be partitioned. For $n=6$ the set becomes $\{6,7,8,9,10,11\}$. However we see that exactly one of the sets is divisible by $13$ and therefore $n=6$ cannot be partitioned. For $n=12$ the set becomes $\{12,13,14,15,16,17\}$. However we see that exactly one of the sets is divisible by $17$ and therefore $n=12$ cannot be partitioned. Putting these together, it follows that no $n$ exists. $\blacksquare$
21.07.2022 13:30
Very easy problem.
05.11.2022 06:29
The idea is to take mod $7$; notice that if one of $n, n+1, n+2, \cdots, n+5$ is a multiple of $7$, it is the sole multiple of $7$, so the partition is impossible. Else, if $n \equiv 1 \pmod 7$, then notice that the two products $x \equiv y \pmod 7$ of the two sets. But this implies that $xy \equiv x^2 \equiv -1 \pmod 7$, which is impossible. Remark. Actually, one can show the stronger problem that there can never exist two subsets of the set that have equal product (dropping the partition condition).
09.11.2022 16:56
https://users.renyi.hu/~p_erdos/1975-46.pdf Then we're done.
25.06.2023 21:54
Solution with $5$ replaced by $1997$, and the set denoted by $A$. $\boxed{\text{No such }n\text{ exist.}}$ The following proof hinges on the fact that $1997$ and $1999$ are prime. Clearly, there is a multiple of $1997$ in $A$, and said multiple is unique unless $1997$ divides both the extrema $n,n+1997$. In any case, there cannot be greater than two subsets in a partition of $A$, or else some but not all of the subsets contain an element divisible by $1997$, preventing the subset products from being all equal (mod $1997$). So if FTSOC $A$ is partitionable in the given manner, it can only be partitioned into two subsets, making the product of $A$'s elements a perfect square $a^2$. Now observe that $A$ contains a unique multiple of $1999$, unless $A\equiv Z_{1999}^\times\pmod{1999}$. But if $A$ contains a unique multiple of $1999$, only one of its two partition subsets can have product divisible by $1999$, contradiction; so we indeed have $A\equiv Z_{1999}^\times$. Then the product of $A$'s elements is $a^2\equiv1998!\equiv-1\pmod{1999}$, which is a contradiction because $(\tfrac{-1}{1999})=(-1)^{(1999-1)/2}=-1$. So the initial assumption was faulty, and $A$ cannot be partitioned in the specified manner, as claimed. $\blacksquare$
30.07.2023 18:38
Note that $n \equiv 1 \pmod 7$ because if $n$ is any other residue modulo $7,$ then one of the number is a multiple of $7,$ which clearly create different products for any partition. From Wilson’s, $6! \equiv -1 \pmod 7.$ Let one of the partitioned subset be $a$ and other be $b.$ Then $$a \equiv b \pmod 7 \implies ab \equiv a^2 \equiv 6! \equiv -1 \pmod 7.$$However, $-1$ is not a quadratic residue modulo $7,$ and hence we cannot partition the set into two subsets so that the product of the numbers in each subset is equal. $\blacksquare$
30.07.2023 19:50
The answer no such $n$. Assume the subsets are nonempty, because otherwise the products cannot be equal. If at least one of these numbers are divisible by $7$, then exactly one of them is divisible by $7$. This implies that exactly one subset has a product of a multiple of $7$, which means the product of numbers in each subset cannot be equal. Otherwise, the set is equivalent to $\{1,2,3,4,5,6\}$ modulo $7$. Notice that the product of the numbers in the set must be a perfect square. So the product of numbers in the set is $6! = 720\equiv -1\pmod 7$. Since $7\equiv 3\pmod 4$, $-1$ is not a quadratic residue modulo $7$, so the product cannot be a perfect square, absurd.
28.09.2023 04:14
I claim that there is no such $n$. Define $\Pi X$ to be the product of all the elements in a set $X$. Observe that there must always be exactly three even integers. We have two separate cases when these respective even integers are $\{n, n+2, n+4\}$ and $\{n+1, n+3, n+5\}$. Case 1: $\left(\{n, n+2, n+4\} \right)$. Then assume $n = 2^km$ for some odd $m$ and integer $k$. We then have $n + 2 = 2(2^{k - 1}m + 1)$ and $n + 4 = 2^2(2^{k-2} + 1)$. Therefore we must have $n+2, n+4$ to be in a different set from $n$. Without loss of generality, assume $n \in A, \{n+2, n+4\} \in B$. Therefore $k = 3$. Now observe that within six consecutive integers there must be a multiple of $5$. Hence as $\Pi A = \Pi B$, we must have $n$ and $n+5$ as these multiples of $5$. As already $n \in A$, we must have $n + 5 \in B$. We thus have Also as $\deg (\Pi A) = \deg (\Pi B)$ (else we trivially obtain strict inequality), we must have the following: \[n(n+1)(n+3) = (n+2)(n+4)(n+5).\]However $n < n+2, n+1 < n+4$ and $n + 3 < n + 5$. Hence no solution exists. Case 2: $\left(\{n+1, n+3, n+5\} \right)$. If we assume once more that $n + 1 = 2^km$ for an odd integer $m$, and $k$ is an integer. We must similarly have $k=3$ and $\{n, n+5\}$ as multiples of $5$. Hence if we assume $n+1 \in A$ and $\{n+3, n+5\} \in B$, we must have the following cases: \begin{align*} &(n+1)n(n+2) = (n+3)(n+5)(n+4) \\ &\text{or} \\ &(n+1)n(n+4) = (n+3)(n+5)(n+2) \\ &\text{or} \\ &(n+1)(n+2)(n+4) = (n+3)(n+5)n \end{align*}The first two equalities are trivial simply by observing that the RHS is always strictly larger than the LHS by comparing factors. The final equation upon simplification yields $n^2 + n = 8$, which provides no integer solutions. Hence no integers solutions exist to the initial problem posed. $\blacksquare$
15.11.2023 12:07
We claim that there exists no such $n$. Let the two sets be $S_1$ and $S_2$. Let the product of the elements of each set be $P_1$ and $P_2$ respectively. It is clear that $n=1$ doesn't work since $1+4=5$ is in at most one of $S_1$ and $S_2$ which makes one one $P_1$ and $P_2$ divisible by 5 and not the other, making it impossible that they are equal. Assume WLOG, $|S_1|\geq |S_2|$. Then, if $|S_1|\geq 4$ we have, \[P_1 \geq n(n+1)(n+2)(n+3)>(n+4)(n+5)\geq P_2\]So, $|S_1|=3$. This means we have three elements each in both the sets. Now, if note that if $n\not \equiv 0 \pmod{5}$, only one of $n,n+1,n+2,\dots, n+5$ is divisible by 5, making it impossible for the two products to be equal. Thus, $n\equiv 0 \pmod{5}$ and $n$ and $n+5$ are in two distinct sets. Assume WLOG, $n \in S_1$. Now, say $S_1={n,a_2,a_3}$ and $S_2={b_1,b_2,n+5}$. If $a_2 \leq n+2$ we have that, \[P_1\leq n(n+2)(n+4) < (n+5)(n+3)(n+1) \leq P_2\]for all $n \geq 2$. So, $a_2 \geq n+3$ which means we have $a_2=n+3$ and $a_3=n+4$. This means, \[n(n+3)(n+4)=P_1=P_2=(n+1)(n+2)(n+5)\]which one can rearrange to obtain $n^2+5n+10=0$ which clearly has no positive integer solutions. Thus, there exists no positive integers $n$ such that the set $\{n,n+1,n+2,n+3,n+4,n+5\}$ can be split into two disjoint subsets such that the products in these subsets are the same.
16.02.2025 14:04
Eh let $n= 5k$, then $k+1\mid 24$, and we don't have many cases to check at all (won't do it now because of school exams).