900 Followers Problem!

m 3 n 3 m 2 + n 2 m n \frac{m^3-n^3}{m^2+n^2-mn}

Find the sum of all prime numbers less than 900 that can be expressed as the above fraction where m m and n n are positive integers.


The answer is 2428.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Kazem Sepehrinia
May 9, 2017

First solution: \boxed{{\color{#D61F06}\text{First solution:}}}

Let m 3 n 3 m 2 + n 2 m n = p , \frac{m^3-n^3}{m^2+n^2-mn‎}=p, where p p is a prime number. Observe that m > n m>n . Let d = gcd ( m , n ) d=\gcd(m, n) , then there are relatively prime numbers a a and b b such that m = a d m=ad and n = b d n=bd . We have a > b a>b and the equation becomes d ( a 3 b 3 ) = p ( a 2 + b 2 a b ) d ( a b ) ( a 2 + b 2 + a b ) = p ( ( a b ) 2 + a b ) . ( 1 ) d(a^3-b^3)=‎p(a^2+b^2-ab)‎‏ \ \ \ \Rightarrow \ \ \ d(a-b)‎\big(a^2+b^2+ab\big)‎=‎p\big( (a-b)^2+ab\big). \qquad (1) The LHS of equation ( 1 ) (1) is divisible by a b a-b , and so is the RHS. But note that ‎ gcd ( a b , ( a b ) 2 + a b ) = gcd ( a b , ( a b ) 2 + ( a b ) 2 + a b ) = gcd ( a b , a b ) . \gcd\big(a-b, ‎(a-b)^2+ab\big)=\gcd\big(a-b, ‎-(a-b)^2+(a-b)^2+ab\big)=\gcd(a-b, ‎ab)‎. If a b a-b and a b ab are not relatively prime, there is a prime number q q such that q a b q|ab and q a b q|a-b . Hence q q divides one of a a or b b . For example, if q a q|a , then q a b q|a-b forces q b q|b , which contradicts gcd ( a , b ) = 1 \gcd(a, b)=1 . Hence gcd ( a b , a b ) = 1 \gcd(a-b, ab)=1 and consequently a b a-b and ( a b ) 2 + a b (a-b)^2+ab are relatively prime. Then, from equation ( 1 ) , (1), we have a b p a-b|p , and, therefore, a b = 1 a-b=1 or a b = p a-b=p . If a b = p a-b=p equation ( 1 ) (1) becomes d ( a 2 + b 2 + a b ) = a 2 + b 2 a b d‎\big(a^2+b^2+ab\big)‎=‎a^2+b^2-ab , which is impossible (LHS is greater than RHS). Thus a b = 1 a-b=1 and‎ equation ( 1 ) (1) becomes d ( ( b + 1 ) 2 + b 2 + b ( b + 1 ) ) = p ( 1 + b ( b + 1 ) ) p = d 3 b 2 + 3 b + 1 b 2 + b + 1 ( 2 ) d‎\big((b+1)^2+b^2+b(b+1)\big)‎=‎p\big(1+b(b+1)\big) \ \ \ \Rightarrow \ \ \ p=d\frac{3b^2+3b+1}{b^2+b+1} \qquad (2) But observe that gcd ( b 2 + b + 1 , 3 b 2 + 3 b + 1 ) = gcd ( b 2 + b + 1 , 3 ( b 2 + b + 1 ) + 3 b 2 + 3 b + 1 ) = gcd ( b 2 + b + 1 , 2 ) = 1 \gcd(b^2+b+1, 3b^2+3b+1)=\gcd(b^2+b+1, -3(b^2+b+1)+3b^2+3b+1)=\gcd(b^2+b+1, -2)=1 Hence b 2 + b + 1 d b^2+b+1|d and there is a positive integer c c such that d = c ( b 2 + b + 1 ) d=c(b^2+b+1) and equation ( 2 ) (2) gives p = c ( 3 b 2 + 3 b + 1 ) p=c(3b^2+3b+1) Its immediate that c = 1 c=1 and p = 3 b 2 + 3 b + 1 p=3b^2+3b+1 . We know that p = 3 b 2 + 3 b + 1 < 900 p=3b^2+3b+1<900 , so b 16 b \le 16 . Checking 1 b 16 1\le b\le16 reveals that the values b = 1 , 2 , 3 , 4 , 6 , 9 , 10 , 11 , 13 , 14 b=1, 2, 3, 4, 6, 9, 10, 11, 13, 14 make 3 b 2 + 3 b + 1 3b^2+3b+1 a prime, which are 7 , 19 , 37 , 61 , 127 , 271 , 331 , 397 , 547 , 631 7, 19, 37, 61, 127, 271, 331, 397, 547, 631 . Thus, answer is 2428 2428 .

Second solution. Generalization: \\ \boxed{{\color{#D61F06}\text{Second solution. Generalization:}}}

Let us solve a more general case when the fraction becomes a positive integer like k k : m 3 n 3 m 2 + n 2 m n = k , \frac{m^3-n^3}{m^2+n^2-mn‎}=k, By the same arguments and notations from first solution we get ‎ d ( a b ) ( a 2 + b 2 + a b ) = k ( ( a b ) 2 + a b ) . ( 1 ) d(a-b)‎\big(a^2+b^2+ab\big)‎=‎k\big( (a-b)^2+ab\big). \qquad (1) And there is a positive integer c c such that k = c ( a b ) k=c(a-b) , thus ‎ d ( a 2 + b 2 + a b ) = c ( a 2 + b 2 a b ) . ( 2 ) d\big(a^2+b^2+ab\big) ‎=‎c\big( a^2+b^2-ab\big) . \qquad (2)‎‏‎ It is clear that c > d c>d . Now we can rearrange this equation as a quadratic in a : a: ( c d ) a 2 b ( c + d ) a + b 2 ( c d ) = 0. ( 3 ) (c-d)a^2-b(c+d)a+b^2(c-d)=0. \qquad (3)‎‏‎ The discriminant of this quadratic must be a square and that is Δ = b 2 ( c + d ) 2 4 b 2 ( c d ) 2 = b 2 ( ( c + d ) 2 4 ( c d ) 2 ) . \Delta =b^2(c+d)^2-4b^2(c-d)^2=b^2\big((c+d)^2-4(c-d)^2\big). Therefore, there is a non-negative integer e e such that ( c + d ) 2 4 ( c d ) 2 = e 2 ‎‎‎(c+d)^2-4(c-d)^2=e^2 . Setting e = 0 e=0 results in a = b a=b , which is a contradiction. Hence e e is positive and the following equation must be solved: ( c + d ) 2 = 4 ( c d ) 2 + e 2 . (c+d)^2=4(c-d)^2+e^2. But this is Pythagorean equation and its solutions for this case are as follows: ‎(a)‎ { c + d = f ( p 2 + q 2 ) 2 ( c d ) = 2 f p q e = f ( p 2 q 2 ) ‎(‎‏b) { c + d = f ( p 2 + q 2 ) 2 ( c d ) = f ( p 2 q 2 ) e = 2 f p q , ‎‏‎\text{‎(a)‎} \begin{cases} ‎c+d&=f\big(p^2+q^2\big) \\ 2(c-d)&=2fpq \\ e&=f\big(p^2-q^2\big) \end{cases}\qquad ‎‎‏\text{‎(‎‏b)} \begin{cases} ‎c+d&=f\big(p^2+q^2\big) \\ 2(c-d)&=f\big(p^2-q^2\big) \\ e&=‎2fpq‎, \end{cases} where positive integers p > q p>q have different parity and are relatively prime, and f f is an arbitrary positive integer. ‎In case ( a ) , (a), { c = 1 2 f ( p 2 + q 2 + p q ) d = 1 2 f ( p 2 + q 2 p q ) e = f ( p 2 q 2 ) , ‎\begin{cases} ‎c‎&=\frac{1}{2}f\big(p^2+q^2+pq\big) \\ d&=\frac{1}{2}f\big(p^2+q^2-pq\big) \\ e&=f\big(p^2-q^2\big), \end{cases}‏‎ and since p 2 + q 2 + p q p^2+q^2+pq and p 2 + q 2 p q p^2+q^2-pq are both odd, we must have f = 2 g f=2g for a positive integer g . g. Thus { c = g ( p 2 + q 2 + p q ) d = g ( p 2 + q 2 p q ) e = 2 g ( p 2 q 2 ) , ‎\begin{cases} ‎c‎&=‎g(p^2+q^2+pq) \\ d&=g(p^2+q^2-pq) \\ e&=2g(p^2-q^2), \end{cases} ‎ and from equatin ( 3 ) (3) a = b ( c + d ) + b e 2 ( c d ) = b p q . a=\frac{b(c+d)+be}{2(c-d)}=b\frac{p}{q}. Note that a negative sign of quadratic formula is not acceptable, because it leads to a < b a<b . Hence a q = b p , aq=bp, and since gcd ( a , b ) = gcd ( p , q ) = 1 \gcd(a, b)=\gcd(p, q)=1 , we get a = p a=p and b = q b=q and finally ‎‎‎ ( m , n ) = ( a d , b d ) = ( g p ( p 2 + q 2 p q ) , g q ( p 2 + q 2 p q ) ) . (m, n)=(ad, ‎bd)=‎\big(gp(p^2+q^2-pq), gq(p^2+q^2-pq)\big). In case ( b ) , (b), { c = 1 4 f ( 3 p 2 + q 2 ) d = 1 4 f ( p 2 + 3 q 2 ) e = 2 f p q . ‎\begin{cases} ‎c‎&=\frac{1}{4}f(3p^2+q^2) \\ d&=\frac{1}{4}f(p^2+3q^2) \\ e&=2fpq. \end{cases}‎‏‎ Since 3 p 2 + q 2 3p^2+q^2 and p 2 + 3 q 2 p^2+3q^2 are both odd, we must have f = 4 g f=4g for a positive integer g g , and hence { c = g ( 3 p 2 + q 2 ) d = g ( p 2 + 3 q 2 ) e = 8 g p q . \begin{cases} ‎c&‎=‎g(3p^2+q^2) \\ d&=g(p^2+3q^2) \\ e&=8gpq. \end{cases} We get from equation ( 3 ) (3) a = b ( d + c ) + b e 2 ( c d ) = b p + q p q . a=\frac{b(d+c)+be}{2(c-d)}=b\frac{p+q}{p-q}. Hence a ( p q ) = b ( p + q ) a(p-q)=b(p+q) and since gcd ( a , b ) = gcd ( p + q , p q ) = 1 \gcd(a, b)=\gcd(p+q, p-q)=1 , we get a = p + q a=p+q and b = p q b=p-q and finally ‎‎‎ ( m , n ) = ( a d , b d ) = ( g ( p + q ) ( p 2 + 3 q 2 ) , g ( p q ) ( p 2 + 3 q 2 ) ) . (m, n)=(ad, ‎bd)=‎\big(g(p+q)(p^2+3q^2), g(p-q)(p^2+3q^2)\big). Therefore, we have two family of solutions in general ‎ { ( m , n ) = ( g p ( p 2 + q 2 p q ) , g q ( p 2 + q 2 p q ) ) ( m , n ) = ( g ( p + q ) ( p 2 + 3 q 2 ) , g ( p q ) ( p 2 + 3 q 2 ) ) , ‎\begin{cases} ‎(m‎, n)=\big(gp(p^2+q^2-pq), gq(p^2+q^2-pq)\big) \\ ‎(m ‎,n)=‎\big(g(p+q)(p^2+3q^2), g(p-q)(p^2+3q^2)\big), \end{cases} where positive integers p > q p>q have different parity and are relatively prime, and g g is an arbitrary positive integer. Now, after substitution in the original fraction, these families of solutions lead to two forms for k k : ‎ { k = g ( p 3 q 3 ) k = 2 g q ( 3 p 2 + q 2 ) , ‎\begin{cases} ‎k=g(p^3-q^3) \\ ‎k=2gq(3p^2+q^2), \end{cases} Observe that k = 2 g q ( 3 p 2 + q 2 ) ‎k=2gq(3p^2+q^2) is always a composite number. Therefore, the only possible case is k = g ( p 3 q 3 ) k=g(p^3-q^3) . Notice that in order for k = g ( p 3 q 3 ) = g ( p q ) ( p 2 + q 2 + p q ) k=g(p^3-q^3)=g(p-q)(p^2+q^2+pq) to be a prime number, we must have g = p q = 1 g=p-q=1 . It follows that k = 3 q 2 + 3 q + 1 k=3q^2+3q+1 must be a prime number. This is what we had in first solution!

"Checking few remaining cases" " b 16 b \leq 16 " You sure make it sound easy

Manuel Kahayon - 4 years, 1 month ago

Log in to reply

How did you solve it? I'd like to see a sketch of your approach :)

Kazem Sepehrinia - 4 years, 1 month ago

Log in to reply

Same as yours. Let m = x d m = xd , n = y d n = yd and we get the equation p = d ( x y ) ( x 2 + x y + y 2 ) x 2 x y + y 2 p = \frac{d(x-y)(x^2 + xy + y^2)}{x^2 - xy + y^2} . After noting that x 2 x y + y 2 x^2 - xy + y^2 is coprime to both x y x-y and x 2 + x y + y 2 x^2 + xy + y^2 , we must then have x 2 x y + y 2 = d x^2 - xy + y^2 = d . Also, if x y 1 x-y \neq 1 , then the LHS will have more than 1 factor, which is not possible since p p is prime. So x = y + 1 x = y + 1 , and I used numbermatics to check whether the values of 3 y 3 + 3 y + 1 3y^3 + 3y + 1 which are less than 900 are prime or not.

Manuel Kahayon - 4 years, 1 month ago

Well, no matter. Nice problem, BTW

Manuel Kahayon - 4 years, 1 month ago

Nice solution!!

Kunal Kundwani - 4 years ago

OMG! That problem was about as intuitive as mud.

William Gosset - 4 years ago

Log in to reply

What an interesting phrase! "as intuitive as mud". I have never heard it before!

Kazem Sepehrinia - 4 years ago
Arijit Dey
Jul 26, 2017

Re-write the following equation as \ [ m 3 n 3 m 3 + n 3 [\frac{m^3 - n^3} {m^3 + n^3} ](m+n)= p p Now for p p to be prime the numerator in the fraction must be a prime. So m 3 n 3 m^3 - n^3 is prime. This implies, m n = 1 m-n=1 . Also assume that g c d ( m , n ) = d gcd(m,n)=d . So, m = a d , n = b d m=ad, n=bd with a>b; and g c d ( a , b ) = 1 gcd( a,b)=1 . Now proceed as the same way as before...

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...