1. Home
  2. Explore
  3. Mathematics
  4. Self-Squaring Numbers

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Self-Squaring Numbers

Speaker 1Speaker 2

Self-Squaring Numbers

15:10
0:00-15:10
  1. Corey

    Let’s begin with a pattern that seems almost like a number trick. Square 5 and you get 25. Square 25 and you get 625. Square 625 and you get 390,625. Each answer ends with the number you squared.

  2. Anna

    And the pattern can keep extending. Squaring 390,625 gives a number whose last five digits are 90,625. Then 90,625 squared ends in 90,625 itself. Each time, more of the ending digits match.

  3. Corey

    So it looks as though we’re building a number with endlessly many digits, one that is equal to its own square. That sounds strange if we imagine digits stretching endlessly to the left on the ordinary number line. But it makes sense in a different number system: the 10-adic numbers, which use base 10.

  4. Anna

    Before we get to what ‘infinite digits to the left’ means, can we do ordinary arithmetic with these numbers?

  5. Corey

    Yes. You add them digit by digit, carrying as usual. Multiplication works too: the final digit of a product depends on the final digits of its factors, and each next digit depends only on digits already to its right. You can therefore determine as many digits of the answer as you want.

  6. Anna

    The source gives a striking multiplication example: a 10-adic number ending in 857142857143, multiplied by 7, produces 1. The usual multiplication carries continue through the digits, and all the digits farther to the left come out zero. So in this number system, that infinite digit string represents one seventh.

  7. Corey

    We can build one third in a similar way. Imagine an infinite digit string that becomes 1 when multiplied by 3. The units digit must be 7, because 3 times 7 is 21: write down 1 and carry 2. At every digit to the left, a 6 works, since 3 times 6 plus the carried 2 is 20.

  8. Anna

    So the 10-adic number with a 7 in the units place and 6s endlessly to the left represents one third. Fractions can show up as these digit expansions, without writing a division sign.

  9. Corey

    There’s another surprising example: an endless string of 9s to the left represents negative one. We can check it using arithmetic. If we call that string m, multiplying it by 10 shifts the digits, and subtracting the two expressions gives 9 equals negative 9m. So m equals negative 1.

  10. Anna

    And the digit-by-digit check is wonderfully direct. Add 1 to the endless string of 9s: 9 plus 1 gives 10, so write 0 and carry 1. The same thing happens at every digit. Since the 9s continue forever, there’s no final place where that carry stops; every digit becomes 0.

  11. Corey

    That means negative numbers are already built into the digit system. For example, a string of 9s with a 3 at the end represents negative 7. To find a negative in general, the source describes taking the 9s complement—replacing each digit d with 9 minus d—and then adding 1.

  12. Anna

    For instance, if a particular 10-adic expansion represents one seventh, its negative is obtained by taking that complement and adding 1. Adding the positive and negative expansions then gives zero. So far, addition, subtraction, multiplication, fractions, and negatives all behave in recognizable ways.

  13. Corey

    But the 10-adics have a serious complication. The number we started building is its own square, so if we call it n, then n squared equals n. Rearranging gives n times n minus 1 equals 0, even though this n is neither 0 nor 1.

  14. Anna

    That breaks a familiar strategy for solving equations. In ordinary arithmetic, if a product is zero, at least one factor must be zero. That lets us factor a complicated equation and solve simpler ones. In the 10-adics, two nonzero numbers can multiply to zero.

  15. Corey

    The source connects that problem to base 10 being composite: 10 equals 2 times 5. Even at the units digit, two nonzero digits can multiply to something ending in zero—for example, 5 times 4 is 20. That makes it possible to build nonzero 10-adic numbers whose product is zero.

  16. Anna

    So mathematicians turn to a base that is prime. Take base 3: its digits are just 0, 1, and 2. Looking at the units digit, the products of nonzero digits are 1, 2, or 4, and 4 is 11 in base 3—not a final digit of zero.

  17. Corey

    The same reasoning applies at every digit. In a prime base, a product can be zero only if one of the factors has a zero digit at that place. Extending that through all the digits restores the important property: a product of p-adic numbers is zero only if one of the numbers is itself zero.

  18. Anna

    A 3-adic number can be read as an infinite expansion in powers of 3. For example, digits 1, 2, 1, 1, and so on give terms like 1 times 3 to the zero, plus 2 times 3, plus 1 times 3 squared, plus 1 times 3 cubed, continuing indefinitely.

  19. Corey

    And the 3-adic number with an endless string of 2s represents negative one. Add 1 from the right: 2 plus 1 is 3, which is 10 in base 3, so write 0 and carry 1. That repeats forever, leaving zeros throughout.

  20. Anna

    These prime-base systems are called p-adics, where p is a prime. They retain the familiar arithmetic, but avoid the troublesome nonzero numbers whose product is zero. That’s a key reason mathematicians use p-adics rather than 10-adics.

  21. Corey

    The story now turns to a much older mathematical question. Diophantus studied polynomial equations through geometric problems. For instance, the Pythagorean equation x squared plus y squared equals z squared has lots of real solutions, but Diophantus was interested in solutions that are whole numbers or fractions.

  22. Anna

    The familiar triples 3, 4, 5 and 5, 12, 13 are examples. And the search for such triples is ancient: a Babylonian clay tablet from around 2000 BC lists many of them, more than a millennium before Pythagoras.

  23. Corey

    Then there’s Fermat’s famous claim, written beside a discussion in Diophantus’s book: the equation x to the n plus y to the n equals z to the n has no integer solutions for n greater than 2. Fermat wrote that he had a marvelous proof, but no room in the margin to include it.

  24. Anna

    That became Fermat’s Last Theorem, and it resisted proof for 358 years. The story here shows how p-adic numbers can help with the broader challenge of finding rational solutions to equations like the ones Diophantus studied.

  25. Corey

    Consider this geometric puzzle: three squares have areas x squared, x to the fourth, and x to the eighth, because the side of each new square is the area of the previous one. Can those three areas add up to another square, y squared? The equation is x squared plus x to the fourth plus x to the eighth equals y squared.

  26. Anna

    There are real-number solutions. Set x equal to 1, for example, and the left side is 3, so y can be the square root of 3. But that isn’t a rational solution, and finding rational solutions is the harder Diophantine question.

  27. Corey

    Kurt Hensel’s approach was to look for solutions as expansions in powers of a prime. Using 3, we write x as x-zero plus x-one times 3 plus x-two times 3 squared, and continue; y gets a similar expansion. Each coefficient is a base-3 digit: 0, 1, or 2.

  28. Anna

    To find those digits efficiently, we use modular arithmetic. Modular arithmetic tracks remainders: 36 modulo 10 is 6, for example, because 36 leaves remainder 6 when divided by 10. A clock is another picture: on a 12-hour clock, 14 hours after midnight is shown as 2 o’clock.

  29. Corey

    In base 3, working modulo 3 is like using a three-hour clock with digits 0, 1, and 2. For example, 2 times 2 is 4, and 4 modulo 3 is 1. The useful feature is that solving modulo 3 determines the first coefficients, modulo 9 helps determine the next ones, modulo 27 the next, and so on.

  30. Anna

    Let’s see the first step for our equation. Modulo 3, all the terms involving higher powers of 3 disappear. We’re left with x-zero squared plus x-zero to the fourth plus x-zero to the eighth equals y-zero squared.

  31. Corey

    The possible x-zero values are 0, 1, and 2. If x-zero is 0, the left side is 0. If it’s 1 or 2, each of those even powers is 1 modulo 3, so the sum is 3, which is also 0 modulo 3.

  32. Anna

    So the left side is always 0 modulo 3. For y-zero, the square is 0 when y-zero is 0, and 1 when it’s 1 or 2. That means y-zero must be 0, while x-zero can be 0, 1, or 2. We have three possible starting pairs.

  33. Corey

    The pair (0, 0) is the obvious zero solution, but it doesn’t describe squares of positive size. So choose the other starting pair x-zero equals 1 and y-zero equals 0, and use the equation modulo 9 to find the next digit of x.

  34. Anna

    When we substitute x equals 1 plus 3x-one and work modulo 9, terms containing a factor of 9 vanish. Simplifying the left side gives 3 plus 15x-one, while the right side is 0 modulo 9. If x-one is 1, that expression is 18, a multiple of 9, so it works.

  35. Corey

    Then we move to modulo 27 to find x-two. With x-zero and x-one both equal to 1, the simplification in the source reduces the condition to 9 plus 18x-two equals 0 modulo 27. Taking x-two equal to 1 gives 27, so that digit works too.

  36. Anna

    Continuing with larger powers of 3—81, 243, and so on—produces more coefficients. In this example, they’re all 1. So the 3-adic solution for x is an infinite string of 1s.

  37. Corey

    What rational number does that infinite string represent? Written as a series, it’s 1 plus 3 plus 3 squared plus 3 cubed, continuing forever. In the ordinary real numbers, those terms grow, so the series doesn’t converge there.

  38. Anna

    But the geometric-series formula would give 1 divided by 1 minus 3, which is negative one-half. And if we substitute x equals negative one-half into the original equation, the left side is one quarter plus one sixteenth plus one two-hundred-fifty-sixth.

  39. Corey

    Putting those over a common denominator gives 64 over 256 plus 16 over 256 plus 1 over 256, or 81 over 256. That’s the square of 9 over 16, so it really does give a rational solution: x equals negative one-half and y equals 9 over 16.

  40. Anna

    For the geometric picture, the square side lengths use the magnitude of x: one-half, one-quarter, and one-sixteenth. Their areas add to 81 over 256, the area of a square with side length 9 over 16. The unusual 3-adic calculation has led us to an ordinary rational solution.

  41. Corey

    So how can that infinite series make sense if its terms grow in ordinary size? The answer is that p-adic numbers have a different idea of distance. They aren’t arranged on the usual number line, and higher powers of 3 make finer, not larger, adjustments.

  42. Anna

    One way to picture the 3-adic integers is as a branching tree. First choose the units digit, 0, 1, or 2. Above each choice, there are three possibilities for the next digit, and that branching continues forever.

  43. Corey

    Each number corresponds to a path through that tree, or a stack of increasingly narrow cylinders. The next digit makes a more precise adjustment to the number than the previous one. That’s why finding coefficients one at a time can feel like zooming in on a solution.

  44. Anna

    To compare two p-adic numbers, look at the first digit where they disagree, starting from the units place. If they differ there, they’re relatively far apart. But if they agree through many powers of 3 and first differ at the 3-to-the-tenth place, they’re very close in the 3-adic sense.

  45. Corey

    In that sense, what looks big in ordinary arithmetic can be small in p-adic arithmetic: a factor of 3 to the tenth corresponds to a distance like 3 to the negative tenth. As the digits agree farther and farther to the left, the p-adic distance gets smaller.

  46. Anna

    That alternate notion of size explains why the geometric series can converge p-adically even though it diverges over the reals. Each successive term, with another factor of 3, is smaller in p-adic distance. The usual geometric-series reasoning then gives the sum negative one-half.

  47. Corey

    Mathematicians formalize these ideas with absolute values. An absolute value should be nonnegative, should be zero only for zero, should multiply across products, and should satisfy the triangle inequality: the size of a sum is at most the sum of the sizes.

  48. Anna

    On the rational numbers, those requirements lead to the familiar real absolute value, the p-adic absolute values, and the trivial one that assigns zero to zero and one to every nonzero number. The p-adic absolute value is the mathematical version of this different idea of closeness.

  49. Corey

    This different geometry is useful because it can make equation-solving more focused. The source describes there being fewer p-adic solutions near a rational solution than real solutions spread through a region. In the reals, a digit-by-digit search could be overwhelmed by all the nearby solutions.

  50. Anna

    The historical payoff is enormous. Andrew Wiles proved Fermat’s Last Theorem in groundbreaking work published in 1995, with a companion paper by Wiles and Richard Taylor. The proof made heavy use of p-adic numbers, so it couldn’t have been the proof Fermat claimed to have squeezed into the margin.

  51. Corey

    The source highlights what’s called the three-five trick. Wiles used the prime 3, but when that approach ran into trouble, the prime 5 could work instead. Each prime gives a different p-adic number system, and switching between them can provide a way forward.

  52. Anna

    So p-adics may feel more alien than negative numbers or square roots of negative numbers, but unfamiliar doesn’t mean useless. They give mathematicians another setting in which to ask questions, measure distance, and solve equations—and they’ve become an important tool in number theory, algebraic geometry, and beyond.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent