Get the latest tech news
Reptends and Reciprocals
Reptends and Reciprocals by Greg Egan
Of course the algorithm that produces these things is just long division, but because most people learn how to do this at a very young age and never revisit it, a lot of the richness and subtlety of the underlying mathematics passes us by. 10 0 ≡ 1 10 1 ≡ 10 = 0 × 13 + 10 10 2 ≡ 100 = 7 × 13 + 9 10 3 ≡ 90 = 6 × 13 + 12 10 4 ≡ 120 = 9 × 13 + 3 10 5 ≡ 30 = 2 × 13 + 4 10 6 ≡ 40 = 3 × 13 + 1 10 0 ≡ 1 10 1 ≡ 10 = 0 × 28 + 10 10 2 ≡ 100 = 3 × 28 + 16 10 3 ≡ 160 = 5 × 28 + 20 10 4 ≡ 200 = 7 × 28 + 4 10 5 ≡ 40 = 1 × 28 + 12 10 6 ≡ 120 = 4 × 28 + 8 10 7 ≡ 80 = 2 × 28 + 24 10 8 ≡ 240 = 8 × 28 + 16 To understand the kinds of sequences that the powers of a base, b, can produce modulo the divisor, d, we need to delve a little further into the algebraic structure that underlies modular arithmetic. The size of < b> is called the multiplicative order of b modulo d. Either this subgroup < b> will be the entire group Z d ×, and all fractions less than 1 with d in the denominator when written in lowest terms can be found by cycling the digits of the reptend, or it will comprise some smaller portion of Z d ×, and the other fractions can be found by taking suitable multiples of < b>, producing reptends with different digits but the same length.
Or read this on Hacker News