4

If we evaluate $15^3 + 17^3 + 19^3 +24^3$, it is easy to see that the smallest prime factor is $3$, but it is tedious (without a calculator).

What I tried to do was use the identity $a^3+b^3=(a+b)(a^2-ab+b^2)$ to try and find an $a+b$ that can be factored out of the sum to yield the smallest prime number. This is what I got.

From the sum alone, we can conclude that it yields an odd number so the smallest prime factor cannot be $2$.

$15^3 + 17^3 + 19^3 +24^3=15^3+24^3+(17+19)(17^2-17(19)+19^2)=15^3+24^3+36(17^2-17(19)+19^2)$

Then we can see that $15$, $24$ and $36$ are divisible by $3$, which we can conclude is the smallest prime factor of the sum since it is the next smallest prime after $2$. This honestly was quite tedious to do since I had to list out all the possibilities for $a+b$, and their combinations.

Is there a better way to do these types of question, or do we really have to do trial-and-error?

Zero
  • 357
  • 4
    Convince yourself that $(3n+1)^3$ is again $1$ more than $3$ times some integer, and that $(3n-1)^3$ is again $1$ less than $3$ times some integer. That makes the result clear. – lulu Mar 09 '23 at 12:31
  • 4
    If you have encountered modular arithmetic, I'd just go through and try mod 2, mod 3, mod 5 etc. since these umbers are pretty small. Obviously 2 here wouldn't work. Mod 3 gives you $0^3+2^3+1^3+0^3=9\equiv 0$ – David P Mar 09 '23 at 12:42
  • @lulu I get that we can then use $(3\cdot6+1)^3$ and $(3\cdot6-1)^3$. But how did you get the idea in the first place? – Zero Mar 09 '23 at 13:10
  • 3
    This is standard practice for modular arithmetic. That's a very powerful set of techniques, well worth learning. – lulu Mar 09 '23 at 13:11
  • @DavidP Thanks for the idea, that works, but it still involves some sort of trial-and-error, which I want to avoid. Of course in this case it's much easier to do so. – Zero Mar 09 '23 at 13:12
  • @lulu I see, I should probably familiarise myself with it then. Thanks. – Zero Mar 09 '23 at 13:18

3 Answers3

4

It is actually far from tedious to prove that $3$ is a prime factor of the sum, if you use modular arithmetic.

$$ \begin{align} 15^3 + 17^3 + 19^3 +24^3\equiv 0^3+(-1)^3+1^3+0^3 = 0\pmod 3 \end{align} $$

Even without modular arithmetic, using the fact that $$(a+b)^3=a^3+3a^2b+3ab^2+b^3$$ you can do the following simplification:

$$ \begin{align} 15^3 + 17^3 + 19^3 +24^3&=(3\cdot 5)^3 + (3\cdot 6 - 1)^3 + (3\cdot 6 + 1)^3 + (3\cdot 8)^3\\ &=3\cdot(3^2\cdot 5^3 + 3^2\cdot 8^3) + (3\cdot 6 - 1)^3 + (3\cdot 6 + 1)^3\\ &=3\cdot (\dots) + ((3\cdot 6)^3 + 3\cdot (\cdots) + 3\cdot (\cdots) - 1) + ((3\cdot 6)^3 + 3\cdot (\cdots) + 3\cdot (\cdots) - 1) \end{align} $$

5xum
  • 123,496
  • 6
  • 128
  • 204
  • Thanks! Would you mind explaining how you got the idea of using $(3\cdot6+1)^3$ and $(3\cdot6-1)^3$? – Zero Mar 09 '23 at 13:14
  • @Zero Basically, from modular arithmetic. In modular arithmetic, you can always "throw away" multiples of the mod, in this case, $3$. So it makes sense to write something as "some multiple of three, which is irrelevant, plus the relevant part, which will be small" – 5xum Mar 09 '23 at 13:17
  • I get the modular arithmetic part, but why mod $3$? Is it because we can see both $15$ and $24$ are divisible by 3? – Zero Mar 09 '23 at 13:35
  • @Zero Well, mod $3$ because you want to prove that the sum is divisible by $3$... – 5xum Mar 09 '23 at 13:37
  • Ah, I see. But I guess my intention was to find an entirely different way of solving and not proving that the sum is divisible by $3$... – Zero Mar 09 '23 at 13:39
  • 3
    @Zero A question of "find the smallest prime factor of some number" will usually be best solved by going through primes one at a time and seeing if they divide the number, there is no way around that... – 5xum Mar 09 '23 at 13:42
  • I see... thanks anyway, you did give another method. – Zero Mar 09 '23 at 14:02
3

Don't look for a better solution than yours. It was clever and not tedious at all. You didn't "have to list out all the possibilities for $a+b,$ and their combinations". You immediately notice that $15^3$ and $24^3$ are multiples of $3$ and you just had to check that $17+19$ also is.

Anne Bauval
  • 34,650
  • Thanks. I guess you're right. But my solution still involves trial-and-error, which I want to avoid. – Zero Mar 09 '23 at 13:15
  • Where do you see a trial-and-error in (my reproduction of) your solution? – Anne Bauval Mar 09 '23 at 13:21
  • Sorry, perhaps trial-and-error isn't the right word to use. What I meant to say is that it is not exactly reproducible for these kinds of problem for other values, such as large values (that have the smallest prime factor that is a relatively large number, like 31). So it would get tedious. Of course, for this specific problem, my (and your) solution is viable. – Zero Mar 09 '23 at 13:38
  • I understand, but the accepted answer suffers of exactly the same problem, which was anyway not mentionned in your question (where what you found tedious was only "to list out all the possibilities for a+b , and their combinations.") – Anne Bauval Mar 09 '23 at 13:42
  • 1
    Yeah, I realised it just now... thanks for bringing it up anyway. – Zero Mar 09 '23 at 13:59
  • @Zero In my experience, most all exercises of this sort are solvable by the methods I mention in my answer (or the "More generally" link using order lcms) without any need for trial-and-error or guessing, etc. It's a very handy method to know. If anything there is not clear I will be happy to elaborate. – Bill Dubuque May 31 '23 at 22:47
2

Find the smallest prime factor of $15^3 + 17^3 + 19^3 +24^3\,\ldots $ is there a better way?

Yes, one simple method is to exploit the polynomial form of the expression. To do so we first rewrite the problem as $\,\color{#0a0}{24}^3+19^3 \equiv (\color{#0a0}{-15})^3 + (-17)^3\pmod{\!p}.\,$ One simple way for this congruence to hold is when the summands on both sides become pairwise congruent, e.g. if $\begin{align} &\color{#0a0}{24}\color{#0a0}{\equiv -15}\\ &19\equiv -17\end{align},\, $ true $\!\iff\! p\mid \gcd(\color{#0a0}{\underbrace{24\!-\!(-15)}_{\large 39}},\underbrace{19\!-\!(-17)}_{\large 36})=\gcd(3,36)=3,\,$ so

$\qquad\phantom{\Rightarrow}\ \ \ \{\color{#0a0}{24},\ \ \ \ 19\}\ \ \equiv\, \{\ \color{#0a0}{{-}15},\ \ \ {-}17\:\!\}\qquad \pmod{\! 3}\ \ $
$\qquad\Rightarrow\ \ \{24^n,\ \ 19^n\} \equiv \{(-15)^n,\ \,(-17)^n\}\, \pmod{\!3}^{\phantom{|^{|^{|^|}}}} $ via Congruence Power Rule
$\qquad\Rightarrow\ \ \ 24^n+ 19^n\ \ \equiv \ \, (-15)^n\!+(-17)^n\,\ \pmod{\!3}^{\phantom{|^{|^{|^|}}}}$

This generalizes your result to any exponent $\,n\in \Bbb N.\,$ This method proves especially handy for a composite modulus $\,pq\,$ where the pairwise congruence is swapped for each modulus, where we can exploit that addition is $\rm\color{#c00}{symmetric}$ (or ditto for any symmetric polynomial $f(x,y)\in\Bbb Z[x,y],\,$ e.g. see below). These types of problems often occur in contests and exercises.


Remark $ $ Below is a less trivial application, from this answer. More generally see here.

Show that $\, 70\mid 52^n+23^n-2^n-3^n\,$ for all $\,n\in\Bbb N$

The problem has innate $\rm\color{#c00}{symmetry}$ that greatly simplifies matters once brought to the fore.

$\qquad\phantom{\Rightarrow}\ \ \{ 52,\ \ \ \ 23\}\ \ \equiv\, \{2,\ \ \ 3\}\ \ \ \ {\rm mod}\,\ 7\ \&\ 10,\ $ since $\ \ \begin{align}&52,\,23\,\equiv\, 3,\, 2\,\bmod{7}\\ &52,\,23\,\equiv\, 2,\, 3\,\bmod{10}\end{align}$ $\qquad\Rightarrow\ \{52^n,\ \ 23^n\} \equiv \{2^n,\ \,3^n\}\,\ {\rm mod}\,\ 7 \ \&\ 10,\ $ by the Congruence Power Rule
$\qquad\Rightarrow\ \ \ 52^n\!+\! 23^n\ \ \equiv \ \ 2^n\!+3^n\ \ \,{\rm mod}\,\ 7\ \&\ 10,\ $ so also $\,{\rm mod}\ 70 = {\rm lcm}(7,10)^{\phantom{|^{|^{|^|}}}}$

since addition $\,f(x,y)\, =\, x + y\ $ is $\rm\color{#c00}{symmetric}$ $\,f(x,y)= f(y,x),\, $ therefore its value depends only upon the (multi-)set $\,\{x,\ y\}.\ $

Generally $ $ if a polynomial $\,f\in\Bbb Z[x,y]\,$ is $\rm\color{#c00}{symmetric}$ then

$$\begin{align} \{A, B\} &\equiv\, \{a,b\}\! \pmod{\!\!\ m\ \&\ n}\\[.4em] \Rightarrow\ f(A,B)&\equiv f(a,b)\!\! \pmod{\!{\rm lcm}(m,n)}\end{align}\qquad\qquad$$

a generalization of the constant-case optimization of CRT = Chinese Remainder, combined with a generalization of the Polynomial Congruence Rule to (symmetric) bivariate polynomials.

Bill Dubuque
  • 272,048
  • OP is essentially a degenerate case of the more general method linked in the remark, which handles most all common exercises of this type. Chase the links for many examples. – Bill Dubuque Mar 09 '23 at 17:53