02 January 2011

Perfect square

The numbers to the right of the decimal point form a perfect magic square: "Each row, column, and diagonal adds to 81.'

I'll accept the assertion as truth, but can someone explain WHY this is true?  I know there are some readers of this blog with quite advanced math skills.

Found in the Futility Closet - the source of many of my best math posts.

5 comments:

  1. Let's run through the decimal expansion of 1/19. It's 10/19 tenths, which is 0, with 100/19 hundredths left over. That's 5, with 50/19 thousandths left over. That's 2, with 120/19 ten-thousandths left over, and so on. When you get to the 19th digit, you've got 10/19 left over, which is back where we started and the decimal recurs. Crucially, every possible remainder (10/19, 20/19... 180/19) has been used except for zero.

    Not all numbers do this -- some hit zero and stop (eg, 1/4), some get stuck in a shorter loop (eg, 1/3). But this one uses every possibility, and that's why this works: in each row, you've already worked out what the first digit will be, and the one after that, and so on forever. For example, 5/19 is 50/19 tenths: 2 with 120/19 hundredths. Clearly we're back in 1/19, but starting at the third digit. Each row is simply the same repeating sequence of 18 digits, but starting in a different place.

    Because each row starts at a different point, the first column also has 18 different digits from the decimal expansion, which is to say, all of them. The second row also has 18 different digits -- the same ones but shifted one place down the line. Again, that's all of them. And so on.

    What you have is less a magic square, and more a sudoku (minus the nine square divisions). Each row and column contains a zero, two ones, two twos, two threes... two eights, and one nine. That is to say, rounded down versions of 10/19, 20/19... 180/19 -- our remainders (in tenths).

    The diagonals have different digits. I don't know if there's a good reason they have the same totals.

    ReplyDelete
  2. Thank you Andrew. I think I remember your solving other math conundrums in the past.

    ReplyDelete
  3. This seems to be a characteristic of prime numbers. I just tried the same thing dividing 11, 13 and 17 into all of the positive integers below them, and they produce groups of endless repeating patterns of varying lengths. Dividing 11 gives 5 separate repeating patterns of 2 digits (09, 18, 27, 36 and 45 (and therefore also 54, 63, 72, 81 and 09)) for a total of 10 patterns (i.e. 11-1); 13 gives 2 repeating patterns of six digits (076923 and 153846) for a total of 12 patterns (13-1); and 17 gives one repeating pattern of 16 digits (2532941176470588) for a total of 17-1. Of course this wouldn't work for non-primes, as ultimately you would hit a divisor of the larger number and end up with a discrete decimal.

    But I wonder: do these prime-patterns follow a pattern as well? Because a prime-1 will always produce an even number, and therefore potentially two or more different repeating-digit sets, is there a way to predict whether the length of the repeating decimal pattern will be equal to the prime-1, or will it be two or more subsets of repeating digits?

    ReplyDelete
  4. This is precisely why I love this blog so much. Thank you Minnesotastan, and thank you Andrew.

    ReplyDelete
  5. And thank you brentusfirmus. If you find an answer to your question, please feel free to post it here.

    ReplyDelete