46

How would you go about finding prime factors of a number like $7999973$? I have trivial knowledge about divisor-searching algorithms.

Bill Dubuque
  • 282,220
  • 11
    This is the only context you have to solve the problem. Find a prime factor of 7999973 without a calculator. I got this problem from an old problem book, but there is no explanation or further context. –  Jan 21 '18 at 23:52
  • 4
    Perhaps you didn't read the question carefully... or perhaps you didn't write the question carefully. Finding prime factors (implicitly: all prime factors) of the number, without a calculator, is going to be quite hard. Finding a prime factor (that is: only one asked for), as in your title, is quite easy in this case. – David Jan 21 '18 at 23:57
  • @David: 7999973 is the product of two primes. Finding one prime factor will give you the other. You're right though, it will be hard to prove that the largest one is prime. – Eric Duminil Jan 22 '18 at 14:08
  • 6
    If ever I could understand what is special with this question and such votes – Guy Fsone Jan 22 '18 at 21:27
  • 3
    Those who don't understand this problem might understand it more if they assumed that it's a problem that is meant to be solvable in a reasonable amount of time. When you take that approach, it's safe to assume there must be some trick or non-linear thinking, as the answer confirms. – Todd Wilcox Jan 22 '18 at 21:34
  • @EricDuminil That's exactly my point. There is no way easily and without a calculator to know that this number is a product of two primes. – David Jan 22 '18 at 22:54
  • As indicated in the other comments, if you are expected to do it by hand in a reasonably short amount of time (e.g. on a single piece of paper) then there must be some special property of the number that makes it easy , In this case it's the difference of 2 cubes. In general you need to test divisibility of $n$ by every prime not exceeding $\sqrt n;$ to find whether $n$ is, or is not, prime. – DanielWainfleet Jan 24 '18 at 05:35
  • As in the dupe, it has obvious form a a difference/sum of cubes, so the Factor Theorem applies. This simple Q&A has so many votes because it was on the Network Hot List (10K views by now). All but a few of the $214$ upvotes on the answer came in the first few days while it was still on the hot list. $\ \ $ – Bill Dubuque Mar 17 '25 at 12:01

1 Answers1

214

The thing to notice here is that 7,999,973 is close to 8,000,000. In fact it is $8000000 - 27$. Both of these are perfect cubes. Differences of cubes always factor: $$a^3 - b^3 = (a-b)(a^2+ab+b^2)$$

Here we have $a=200, b=3$, so $a-b= 197$ is a factor.

F1Krazy
  • 115
  • 1
  • 8
MJD
  • 67,568
  • 43
  • 308
  • 617
  • 3
    And Pari says the other is $40609$. – Bernard Jan 22 '18 at 00:04
  • 13
    @Bernard: Also note that this method does not prove that the factors we got are prime. – user21820 Jan 22 '18 at 09:30
  • 15
    @user21820 As clarified in a comment, the original question only required finding a prime factor, and 197 is small enough to check by hand. – G_B Jan 22 '18 at 10:26
  • 7
    @GeoffreyBrent: Yup I know that 197 is prime; I'm just stating for the record that this method in general does not say anything about primality. – user21820 Jan 22 '18 at 10:33
  • 3
    @user21820 well it gives you a relatively small factor (compared to 7.999.973), and then you could still divide this one by any of its factors until you got a prime – Rafalon Jan 22 '18 at 15:14
  • 9
    @Rafalon trying to divide by 7, 11 and 13 is enough (for 197). – Will Ness Jan 22 '18 at 20:02
  • 1
    @WillNess that's exactly my point :) – Rafalon Jan 22 '18 at 21:44
  • 1
    @MJD Love your answer but why exactly did you choose 8 million as your starting point.. Too satisfy the two wo perfect cubes ? or a deeper theory? – Peter H Jan 23 '18 at 06:09
  • 7
    @PeterH Because the original number was suspiciously close to $8,000,000$, with all those $9$'s, so he checked to see whether it worked, and it did. It's a standard type of problem, although in my experience, powers of $10$ are more common as starting points for these problems than numbers like eight million. – Arthur Jan 23 '18 at 09:54
  • 1
    For the record, $7$, $11$ and $13$ are enough to check that $197$ is prime, because it is not even, the digits don't add up to a number that is divisible by $3$, it doesn't end in $0$ or $5$, and $17^2\gt 197$. – John Douma Mar 17 '25 at 12:02