- Get link
- X
- Other Apps
A tribute to Martin Gardner.
For which sets of positive integers does the sum equal the product? For example, when does x1+x2=x1⋅x2? It's easy to see that this is only true when x1=x2=2.
In the general case our equality is ∑ni=1xi=∏ni=1xi. We can rearrange terms to give x1+x2+n∑i=3xi=x1⋅x2⋅n∏i=3xi, and this in turn factors nicely to give us (x1⋅n∏i=3xi−1)⋅(x2⋅n∏i=3xi−1)=(n∏i=3xi)⋅(n∑i=3xi)+1. How does this help? Consider the case n=5, and without loss of generality assume xi≥xi+1 for all i. If x3=x4=x5=1 our factorized equation becomes (x1−1)⋅(x2−1)=4, with the obvious solutions x1=5,x2=2;x1=3,x2=3. The only remaining case to consider is x3=2, as any other case forces ∑ni=1xi<∏ni=1xi. For this case our equality becomes (2x1−1)⋅(2x2−1)=9. This gives us the remaining solution x1=x2=x3=2 with the other xi=1.
This is quite efficient. For example, for the case n=100 the only equations we need to consider are (x1−1)⋅(x2−1)=99(2x1−1)⋅(2x2−1)=199(3x1−1)⋅(3x2−1)=301(4x1−1)⋅(4x2−1)=405(4x1−1)⋅(4x2−1)=401(6x1−1)⋅(6x2−1)=607(9x1−1)⋅(9x2−1)=919(8x1−1)⋅(8x2−1)=809(12x1−1)⋅(12x2−1)=1225(16x1−1)⋅(16x2−1)=1633. Now 199, 401, 607, 919, 809 are all prime ruling them out immediately, and 301 and 1633 don't have factors of the right form. The other equations yield the five solutions (100,2),(34,4),(12,10),(7,4,4),(3,3,2,2,2) with the other xi=1.
For n=1000 you'd need to consider 52 cases, but most of these are eliminated immediately. I get the six solutions (1000,2),(334,4),(112,10),(38,28),(67,4,4),(16,4,4,4).
Have fun!
For which sets of positive integers does the sum equal the product? For example, when does x1+x2=x1⋅x2? It's easy to see that this is only true when x1=x2=2.
In the general case our equality is ∑ni=1xi=∏ni=1xi. We can rearrange terms to give x1+x2+n∑i=3xi=x1⋅x2⋅n∏i=3xi, and this in turn factors nicely to give us (x1⋅n∏i=3xi−1)⋅(x2⋅n∏i=3xi−1)=(n∏i=3xi)⋅(n∑i=3xi)+1. How does this help? Consider the case n=5, and without loss of generality assume xi≥xi+1 for all i. If x3=x4=x5=1 our factorized equation becomes (x1−1)⋅(x2−1)=4, with the obvious solutions x1=5,x2=2;x1=3,x2=3. The only remaining case to consider is x3=2, as any other case forces ∑ni=1xi<∏ni=1xi. For this case our equality becomes (2x1−1)⋅(2x2−1)=9. This gives us the remaining solution x1=x2=x3=2 with the other xi=1.
This is quite efficient. For example, for the case n=100 the only equations we need to consider are (x1−1)⋅(x2−1)=99(2x1−1)⋅(2x2−1)=199(3x1−1)⋅(3x2−1)=301(4x1−1)⋅(4x2−1)=405(4x1−1)⋅(4x2−1)=401(6x1−1)⋅(6x2−1)=607(9x1−1)⋅(9x2−1)=919(8x1−1)⋅(8x2−1)=809(12x1−1)⋅(12x2−1)=1225(16x1−1)⋅(16x2−1)=1633. Now 199, 401, 607, 919, 809 are all prime ruling them out immediately, and 301 and 1633 don't have factors of the right form. The other equations yield the five solutions (100,2),(34,4),(12,10),(7,4,4),(3,3,2,2,2) with the other xi=1.
For n=1000 you'd need to consider 52 cases, but most of these are eliminated immediately. I get the six solutions (1000,2),(334,4),(112,10),(38,28),(67,4,4),(16,4,4,4).
Have fun!
Comments
Post a Comment