The most interesting number here modulo is 7. It cycles through all the remainders 1 to 6 before going back to the start (remainder 1). We say it has cycle length 6. Here are the in the long division of 1/7 set out one after another: 1 = 0 x 7 + 1 10 = 1 x 7 + 3 30 = 4 x 7 + 2 20 = 2 x 7 + 6 60 = 8 x 7 + 4 40 = 5 x 7 + 5 50 = 7 x 7 + 1 0 x 7 + 1 We can see by step 6 we are back to where we started, with a remainder of 1, which is why it has a cycle of 6. If we think about this for a bit longer, it’s fairly obvious that the longest cycle we can ever have is one less than the denominator, and this only happens if we cycle through all the possible remainders. It turns out the next fraction with cycle length 1 less than the denominator is 1/17. You might have conjectured that 1/13 = 0.07692307 was going to be one, but it only has a cycle length of 6. You might have also have noticed that all the cycle lengths are factors of one less than the denominator (6 is a factor of one less than 13). At this point you have probably realized that it has something to do with primality. Well, yes it has; all numbers that are relatively prime to 2 or 5 will not terminate as they will never have 0 remainders. Putting this all together, we can finally say that 1/n will be a recurring decimal with a cycle length a factor of n-1 if n is relatively prime to 10. 3.9 Greek Ladders Here is something called a Greek ladder from around 100AD, although there is evidence it may have been known to Indian mathematicians 500 years earlier as it appears in their Sulba-Sultras, religious texts that contained instructions on how to construct altars to high levels of precision. The Sulba-sultras gave a way of constructing squares equal to the sum of two smaller squares, also showing that they were aware of Pythagoras' theorem before the Greeks. A B
Finally, notice that summing the hex numbers to the cube numbers. To see why this is true, imagine them as three sides of a cube, and then try to imagine putting the smaller ones inside the next largest one, like this: If you can’t see how, try making them with multi-link cubes! Here are some interesting sums of squares: 12 – 22 + 32 – 42 = -(1 + 2 + 3 + 4) 12 – 22 + 32 – 42 + 52 = 1 + 2 + 3 + 4 + 5 They are indeed true. To see why, you could use the difference of two squares. Writing the first one as (1+2)(1-2) + (3+4)(3-4) = (1+2)(-1) + (3+4)(-1) and the second one as 1 + (3+2)(3-2) + (5+4)(5-4) = 1 + (3+2) + (5+4) we can see these patterns will continue. Summing the odd squares gives: 12 = 1 = 1 x 2 x 3/6 12 + 32 = 10 = 3 x 4 x 5 / 6 12 + 32 + 52 = 35 = 5 x 6 x 7 / 6 5.3 The great Gauss Here are a few investigations that involve some of the mathematics that German mathematician Carl Friedrich Gauss worked on. 5.3.1 Quadratic Residues* Gauss was the first to study Quadratic Residues in depth. Quadratic Residues are just the square numbers mod n for different n. We found the QRs mod 25 in the second part of the investigation triangle cakes. For example, if you take the square numbers mod 5 you will find that you only get 1 and 4 (as well as 0 which we are not interested in here). We say that 1 and 4 are quadratic residues (QR) mod 5, and 2 and 3 are non-residues (NR).
Here is a set of three threads returning to their starting positions: We are going work out what is happening in the 3-thread example. The first change switches the position of all three threads. You could think of it as doing 2 swaps in one go (R with B then R with G), and it will always give 2 crossings. A single swap can either result in one crossing: …or sometimes three crossings: So if the number of swaps is even/odd, then so are the crossings. This table records what happened in the example given: Order Swaps Number of swaps Number of crossings Letters in the original cycle order? Start: (G,B,R) - 0 0 Y (R,G,B) (R,B) (R,G) 2 2 Y (B,G,R) (R,B) 3 5 N (B,R,G) (G,R) 4 6 Y