27

A while ago, just playing with some numbers I noticed that $1+2+3=1\cdot2\cdot3$, so I started thinking about the non-zero integer solutions of the equation

$$\prod_{i=1}^na_i=\sum_{i=1}^na_i$$

For example, for $n=2$, the only solution is the pair $(2,2)$, for $n=3$ the only solutions are $(1,2,3)$ and $(-1,-2,-3)$ and that's what I have by now, the problem is, I solved the case $n=2$ using divisibility and the case $n=3$ I proved that if $|a_1|\leq|a_2|\leq|a_3|$, then for $a_2>2$ there was no solution, so I just analyzed every case. Can someone help me with the general case?

  • 6
    here is a nice pdf about this https://www-users.mat.umk.pl/~anow/ps-dvi/si-krl-a.pdf – Deepesh Meena Sep 16 '18 at 20:53
  • 4
    also read this https://www.researchgate.net/publication/270185488_When_Does_a_Sum_of_Positive_Integers_Equal_Their_Product – Deepesh Meena Sep 16 '18 at 20:55
  • I was going to make a few basic observations. But that pdf covers them all. I'll just add: you state "If $|a_1| \le |a_2| \le |a_3|....$. Since addition and multiplication are commutative you can arrange them in order of size and without loss of generality you can assume that $this is always true. – fleablood Sep 16 '18 at 20:57
  • 3
    @DeepeshMeena The link seems to be dead. –  Jun 30 '19 at 13:15
  • Related: https://math.stackexchange.com/q/4776443/8530 – Mats Granvik Feb 15 '24 at 18:18
  • 4
    @MaximeJaccon since the OP has been inactive for some time, I would like to ask you to clarify what exactly you are asking for. Is it the "general case", $n=3$ case? Are you looking for the no. of solutions or parametrizations, if any? – D S Mar 01 '24 at 17:52

2 Answers2

8

This answer is partial. It concerns mainly natural solutions of the equation

The brief search showed several related papers, which I listed below as the references. Unfortunately, I had no time to study them all, so my survey below is incomplete.

It seems that all of these references concern natural solutions of the equation. So let $a(n)$ be the number of all nondecreasing natural solutions. To avoid the trivial case we assume that $n\ge 1$.

For each natural $n$ the equation has a natural solution $(1,\dots,1,2,n)$ [Theorem 2, KN], so $a(n)\ge 1$. On the other hand, $a(n)\le n^n$, see [EN].

All nondecreasing natural solutions are listed for $n\le 5$ in the proof of Theorem 1 from [KN], for $n\le 7$ in the solution of Problem 2.14 from [ML] and before, for $n\le 12$ in Table 1 from [Eck], and for $n=50$ and $n=100$ in [KN, p.4].

The numbers $a(n)$ for all natural $n\le 100$ are listed in [KN]:

Also is known that $a(1997) = 20$, $a(1998) = 8$, $a(1999) = 16$, and $a(2000) = 10$ [KN].

Thus, the value of $a(n)$ varies.

It can be arbitrary large. Indeed, pick any natural $s$. Then for $n=2^{2s}+1$, the equation has $s+1$ nondecreasing natural solutions, namely, $(1,\dots,1, 2^j+1, 2^{2s-j})$, where $j\le s$ is any nonnegative integer [Ser, 175].

On the other hand, it can be just $1$. In this case the number $n$ is called exceptional [Eck]. The set of exceptional $n\le 10^{10}$ is $\{2,3,4,6,24, 114, 174, 444\}$ and is unknown whether there exists other exceptional $n$, see [Eck]. On the other hand, if $n>6$ is exceptional then $n-1$ is prime and $n$ equals $0$, $24$, $30$, $84$, $90$, $114$, $150$ or $174$ modulo $210$, see [KN, Theorem 9 and p.5].

On the third hand, for some natural $n$ the number of all nonzero solutions of the equation can be infinite. Namely, when $n\equiv 1\pmod 4$, and the sequence $(a_i)_{i=1}^n$ contains $(n-1)/2$ numbers $1$ and $(n-1)/2$ numbers $-1$, then the remaining number from the sequence can be arbitrary nonzero integer. We call these solutions special.

On the fourth hand, we can bound the number of all nonzero nonspecial solutions of the equation for any natural $n$ as follows.

Proposition. For any natural number $n$ the equation has at most $n(2n)^{n-1}$ nonzero nonspecial integer solutions.

Proof. Let $(a_1,\dots,a_n)$ be any solution of the equation. Suppose that $\max_{1\le i\le n} |a_i|$ is attained for some natural $i\le n$. For the sake of simplicity assume that $i=n$. Then $\left| \sum_{j=1}^{n-1} a_j\right|\le |a_n|n$, so $\prod_{j=1}^{n-1} |a_j|\le n$. It follows $|a_j|\le n$ for each natural $j\le n-1$, so there are at most $(2n)^{n-1}$ choices for the sequence $(a_j)_{j=1}^{n-1}$. When this sequence is chosen, there remains at most one choice for $a_n$, but the case when the coefficients at $a_n^1$ and $a_n^0$ it cancel. The latter holds iff $\prod_{j=1}^{n-1} a_j=1$ and $\sum_{j=1}^{n-1} a_j=0$. This holds iff $a_i=\pm 1$ for each natural $i\le n-1$, $n-1$ is even, exactly a half of numbers from the sequence $(a_j)_{j=1}^{n-1}$ equal $1$, and $(-1)^{(n-1)/2}=1$. Then $n\equiv 1\pmod 4$ and the solution $(a_1,\dots,a_n)$ is special. $\square$

References

[Eck] Michael W. Ecker, When Does a Sum of Positive Integers Equal Their Product?, Mathematics Magazine 75:1 (Feb 2002).

[EN] C.D. Evans, M.A. Nyblom, An Algorithm to Solve the Equal-Sum-Product Problem.

[KN] Leo Kurlandchik, Andrzej Nowicki, When the sum equals the product (JSTOR link), The Mathematical Gazette 84(499) 91--94. (This is the paper at the dead link from Deepesh Meena's comment).

[Man] barak manos et al., A finite sequence of natural numbers, whose sum equal its product:, Mathematics StackExchange.

[ML] Equal Sum-Product Problem, Michigan Lemma 2020.

[Ser] W. Sierpi'nski, Number Theory, Part II, (in Polish), PWN, Warszawa 1959.

[Zak] Maciej Zakarczemny, On the equal sum and product problem, Acta Math. Univ. Comenianae XC:4 (2021) 387-402.

[Zak2] Maciej Zakarczemny, Equal-Sum-Product problem II, Canadian Mathematical Bulletin, First View, 1-11.

Alex Ravsky
  • 90,434
3

This is a partial answer.

We want to find all the non-zero integer solutions of $\displaystyle\prod_{j=1}^{n}a_j=\sum_{j=1}^{n}a_j$ for $n\ge 2$.

This answer is only interested in the solution $(a_1,a_2,\cdots,a_n)$ satisfying $|a_1|\le |a_2|\le \cdots \le|a_n|$. If $a_j=-a_{j+1}$, then this answer is only interested in $(a_j,a_{j+1})$ satisfying $a_j\lt a_{j+1}$.
(For example, for $n=4$, this answer is interested in $(a_1,a_2,a_3,a_4)=(\color{red}{-1},\color{red}1,-2,-2)$, not $(\color{red}1,\color{red}{-1},-2,-2)$.)

This answer proves the following claims :

Claim 1 : If $n\equiv 1\pmod 4$, then the equation has infinitely many non-zero integer solutions.

Claim 2 : If $n\not\equiv 1\pmod 4$, then the equation has only finitely many non-zero integer solutions.

Claim 3 : If $n\ge 3$, then the equation has at least one non-zero integer solutions where at least one $a_i$ is negative.

Claim 4 : If $n=2$, the only non-zero integer solution of the equation is $(a_1,a_2)=(2,2)$.

Claim 5 : If $n=3$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3)=(1,2,3),(-1,-2,-3)$.

Claim 6 : If $n=4$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3,a_4)=(1,1,2,4),(-1,1,-2,-2)$.

Claim 7 : If $n=5$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3,a_4,a_5)=(-1,-1,1,1,k),(1,1,1,2,5),(-1,-1,-1,-2,-5),(1,1,1,3,3),(-1,-1,-1,-3,-3),(1,1,2,2,2),(-1,-1,-2,-2,-2)$ where $k$ is any non-zero integer.

Claim 8 : If $n=6$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3,a_4,a_5,a_6)=(1,1,1,1,2,6),(-1,-1,1,1,2,2),(-1,-1,-1,-1,-2,2),(-1,-1,-1,1,-2,-4)$


I'll use the following ideas to prove the claims.

  • We may suppose that $|a_1|\le |a_2|\le\cdots \le |a_n|$.

  • $\displaystyle\bigg|\prod_{j=1}^{n-1}a_j\bigg|\le n$.
    Proof : $\displaystyle\bigg|\prod_{j=1}^{n-1}a_j\bigg||a_n|=\bigg|\sum_{j=1}^{n}a_j\bigg|\le \sum_{j=1}^{n}|a_j|\le n|a_n|$

  • For $n\ge 3$, $|a_1|=|a_2|=\cdots =|a_m|=1$ and $\displaystyle\bigg|\prod_{j=m+1}^{n-1}a_j\bigg|\le n$ where $m=n-1-\lfloor\log_2n\rfloor$.
    Proof : Suppose that $|a_m|\ge 2$. Then, $n\ge \displaystyle\bigg|\prod_{j=1}^{n-1}a_j\bigg|\ge \bigg|\prod_{j=m}^{n-1}a_j\bigg|\ge 2^{n-m}=2^{1+\lfloor\log_2n\rfloor}\gt 2^{\log_2 n}=n$ which is a contradiction.

  • $\displaystyle\bigg|\prod_{j=m+1}^{n-1}a_j\bigg|\le n-m+\frac{m}{|a_{n-1}|}$
    Proof : $\displaystyle\bigg|\prod_{j=m+1}^{n}a_j\bigg|\le m+(n-m)|a_n|$, so $\displaystyle\bigg|\prod_{j=m+1}^{n-1}a_j\bigg|\le n-m+\frac{m}{|a_n|}\le n-m+\frac{m}{|a_{n-1}|}$

  • $m+\displaystyle\sum_{j=m+1}^{n}a_j=\prod_{j=m+1}^{n}a_j\pmod 2$
    Proof : This is because $a_1\equiv a_2\equiv \cdots\equiv a_m\equiv 1\pmod 2$.

  • If $a_1a_2\cdots a_{n-1}-1\not=0$, then $\displaystyle 1-\frac{1}{|a_{n-1}|}\sum_{j=1}^{n-1}|a_j|\le\prod_{j=1}^{n-1}a_j\le 1+\frac{1}{|a_{n-1}|}\sum_{j=1}^{n-1}|a_j|$
    Proof : $|a_{n-1}|\le |a_n|=\bigg|\dfrac{a_1+a_2+\cdots +a_{n-1}}{a_1a_2\cdots a_{n-1}-1}\bigg|\le\dfrac{|a_1|+|a_2|+\cdots +|a_{n-1}|}{|a_1a_2\cdots a_{n-1}-1|}\implies |a_1a_2\cdots a_{n-1}-1|\le\frac{|a_1|+|a_2|+\cdots +|a_{n-1}|}{|a_{n-1}|}$

  • If $(a_1,a_2,\cdots, a_n)=(b_1,b_2,\cdots, b_n)$ is a solution where $n$ is odd, then $(a_1,a_2,\cdots, a_n)=(-b_1,-b_2,\cdots, -b_n)$ is a solution.

  • If $(a_1,a_2,\cdots, a_n)=(b_1,b_2,\cdots, b_n)$ is a solution, then $(a_1,a_2,\cdots, a_{n+4})=(-1,-1,1,1,b_1,b_2,\cdots, b_n)$ is a solution.


In the following, I'm going to prove the claims.

Claim 1 : If $n\equiv 1\pmod 4$, then the equation has infinitely many non-zero integer solutions.

Proof : $(a_1,a_2,\cdots,a_n)=(\underbrace{-1,-1,\cdots,-1}_{\frac{n-1}{2}},\underbrace{1,1,\cdots, 1}_{\frac{n-1}{2}},k)$ is a solution where $k$ is any non-zero integer.

Claim 2 : If $n\not\equiv 1\pmod 4$, then the equation has only finitely many non-zero integer solutions.

Proof : We have $a_n(a_1a_2\cdots a_{n-1}-1)=a_1+a_2+\cdots +a_{n-1}$. Suppose that $a_1a_2\cdots a_{n-1}-1=0$. Then, $|a_1|=|a_2|=\cdots =|a_{n-1}|=1$. Let $A$ be the number of $j(1\le j\le n-1)$ such that $a_j=1$. Let $B$ be the number of $j(1\le j\le n-1)$ such that $a_j=-1$. Since $a_1+a_2+\cdots +a_{n-1}=0$, we see that $B$ is even and that $A=B$. It follows that $n-1=A+B=2B\equiv 0\pmod 4$ which is a contradiction. Since $a_1a_2\cdots a_{n-1}-1\not=0$, we have $|a_{n-1}|\ge 2$ and $|a_n|=\bigg|\frac{a_1+a_2+\cdots +a_{n-1}}{a_1a_2\cdots a_{n-1}-1}\bigg|\le\frac{(n-1)|a_{n-1}|}{|a_1a_2\cdots a_{n-1}-1|}=\frac{n-1}{|a_1a_2\cdots a_{n-2}-\frac{1}{a_{n-1}}|}\le\frac{n-1}{||a_1a_2\cdots a_{n-2}|-\frac{1}{|a_{n-1}|}|}\le \frac{n-1}{\frac 12}=2(n-1)$

Claim 3 : If $n\ge 3$, then the equation has at least one non-zero integer solutions where at least one $a_i$ is negative.

Proof : For odd $n$, $(a_1,a_2,\cdots,a_n)=(-1,-1,\cdots, -1,-2,-n)$ is a solution. If $(a_1,a_2,\cdots, a_n)=(b_1,b_2,\cdots, b_n)$ is a solution where $n$ is even, then $(a_1,a_2,\cdots, a_{n+2})=(-1,1,-b_1,-b_2,\cdots, -b_n)$ is a solution. Since $(a_1,a_2)=(2,2)$ is a solution for $n=2$, the equation for even $n\ge 4$ has at least one non-zero integer solutions where at least one $a_i$ is negative.

Claim 4 : If $n=2$, the only non-zero integer solution of the equation is $(a_1,a_2)=(2,2)$.

Proof : Since $(a_1-1)(a_2-1)=1$ where $a_1,a_2$ are non-zero, we have $(a_1-1,a_2-1)=(1,1)$.

Claim 5 : If $n=3$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3)=(1,2,3),(-1,-2,-3)$.

Proof : We have $|a_1|=1,|a_2|\le 2+\frac{1}{|a_2|}$ and $|a_2|\le 2$. For $a_1=1$, we have $a_3=1+\frac{2}{a_2-1}$ which implies $a_2=2$ and $a_3=3$.

Claim 6 : If $n=4$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3,a_4)=(1,1,2,4),(-1,1,-2,-2)$.

Proof : We have $|a_1|=1,|a_2|\le 2, |a_2a_3|\le 3+\frac{1}{|a_3|}$ and $1+a_2+a_3+a_4\equiv a_2a_3a_4\pmod 2$. There is only one odd integer in $a_2,a_3$ and $a_4$. So, we have $|a_2|=1$ and $|a_3|=2$. Since we have $-1\le a_1a_2a_3\le 3$, we get $a_1a_2a_3=2$ and $|a_1+a_2+a_3|\ge 2$.

Claim 7 : If $n=5$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3,a_4,a_5)=(-1,-1,1,1,k),(1,1,1,2,5),(-1,-1,-1,-2,-5),(1,1,1,3,3),(-1,-1,-1,-3,-3),(1,1,2,2,2),(-1,-1,-2,-2,-2)$ where $k$ is any non-zero integer.

Proof : If $a_1a_2a_3a_4-1=0$, then $(a_1,a_2,a_3,a_4,a_5)=(-1,-1,1,1,k)$ is a solution where $k$ is any non-zero integer. In the following, $a_1a_2a_3a_4-1\not=0$. We have $|a_1|=|a_2|=1,|a_3|\le 2$ and $|a_3a_4|\le 3+\frac{2}{|a_4|}$.
(case 1) If $|a_3|=1$, then $|a_4|\le 3$.
For $|a_4|=1$, $a_5=\pm 1$.
For $|a_4|=2$, since $-\frac 32\le a_1a_2a_3a_4\le \frac 72$, we have $a_1a_2a_3a_4=2$ and $|a_1+a_2+a_3+a_4|\ge 2$.
For $|a_4|=3$, since $-1\le a_1a_2a_3a_4\le 3$, we have $a_1a_2a_3a_4=3$ and $a_1+a_2+a_3+a_4=\pm 6$ since $6=(3-1)\times 3\le |a_1+a_2+a_3+a_4|\le |a_1|+|a_2|+|a_3|+|a_4|=6$
(case 2) If $|a_3|=2$, then $|a_4|=2$. Since $-2\le a_1a_2a_3a_4\le 4$, we have $a_1a_2a_3a_4=4$ and $a_1+a_2+a_3+a_4=\pm 6$.

Claim 8 : If $n=6$, the only non-zero integer solutions of the equation are $(a_1,a_2,a_3,a_4,a_5,a_6)=(1,1,1,1,2,6),(-1,-1,1,1,2,2),(-1,-1,-1,-1,-2,2),(-1,-1,-1,1,-2,-4)$

Proof : We have $|a_1|=|a_2|=|a_3|=1,|a_4|\le 2,|a_4a_5|\le 3+\frac{3}{|a_5|}$ and $1+a_4+a_5+a_6\equiv a_4a_5a_6\pmod 2$. There is only one odd integer in $a_4,a_5$ and $a_6$.
(case 1) If $|a_4|=1$, then $|a_5|=2$. For $a_1a_2a_3a_4a_5=2$, we have $|a_1+a_2+a_3+a_4+a_5|\ge 2$. For $a_1a_2a_3a_4a_5=-2$, we have $a_1+a_2+a_3+a_4+a_5=\pm 6$.
(case 2) If $|a_4|=2$, then $|a_5|=2$. Since $-\frac 52\le a_1a_2a_3a_4a_5\le\frac 92$, we have $a_1a_2a_3a_4a_5=4$ and $|a_1+a_2+a_3+a_4+a_5|\ge 6$.

mathlove
  • 139,939