Mariam Eqbal, {2019} Repeating Decimal - Water

seen from China
seen from Türkiye

seen from Malaysia
seen from Philippines
seen from Germany
seen from China

seen from Türkiye
seen from Iraq
seen from China

seen from United States

seen from United Kingdom

seen from Germany
seen from China
seen from Germany

seen from Spain

seen from Türkiye
seen from Syria
seen from United States

seen from United States

seen from China
Mariam Eqbal, {2019} Repeating Decimal - Water
Mathematical coincidences explained
There are several mathematical facts, many of which are somewhat well-known, which most people take to be coincidences. In this post I will show how many of these have explanations that make them less coincidental than seemed, or show their equivalence to another mathematical coincidence.
···
Fact: 10^6 - 2 = 2*31*127^2. The factorization contains two distinct Mersenne primes, and one of them is repeated.
Consequences: This is deeply related to the fact that sqrt(62) starts 7.87400787401…, repeating 7874 twice.
Explanation: This ultimately comes down to the fact that 2^7 - 5^3 = 3, and 10 = 2*5. This can be shown by factoring a polynomial function that yields 10^6 - 2 when x = 5^3.
Let x = 5^3 = 125, so x + 3 = 2^7 = 128. Then 2*10^6 = 5^6*2^7 = x^2*(x + 3) = x^3 + 3x^2. 2*(10^6 - 2) = x^3 + 3x^2 - 4 = (x - 1)(x + 2)^2 = 124*127^2 = 2^2*31*127^2 10^6 - 2 = 2*31*127^2.
Really, this comes down to the fact that factorization of numbers close to 2*10^6 follows factorization of certain cubic polynomials. The repeated 127 factor is a lot less surprising when it becomes a repeated x + 2 factor in the polynomial setting. This also shows why 126^3 = 2000376 is so close to 2*10^6; the relevant polynomial is (x + 1)^3 = x^3 + 3x^2 + 3x + 1, which is only 3x + 1 greater than x^3 + 3x^2 = 2*10^6.
The same framework also explains why 52^3 = 140608 is so close to 375^2 = 140625, a fact noticed by Wendy Krieger. If x = 25 and x + 2 = 27, we have:
3*52^3 = 24*26^3 = (x - 1)(x + 1)^3 = x^4 + 2x^3 - 2x - 1 3*375^2 = 27*25^3 = (x + 2)x^3 = x^4 + 2x^3
···
Fact: 5882353 = 588^2 + 2353^2. Also, 5882353 = (10^8 + 1)/17.
Explanation: First of all, a noteworthy fact about this identity is that 2353 = 588*4 + 1. The equality 5882353 = (10^8 + 1)/17 means that 1/17 is close to 0.05882353 (actually it's slightly less). The expansion of 4/17 is equal to the expansion of 1/17 cyclically permuted four digits backwards. Thus, 4/17 is about 0.2353. This explains why 2353 = 588*4 + 1 is not a third coincidental fact but a consequence of the connection to 1/17.
In order to find numbers a and b such that a^2 + b^2 = a||b (where || means concatenation), we need to solve a^2 + b^2 = 10^n a + b, where n is the number of digits in b. In general, integer solutions to this equation are rare. In this case, we also know that b = 4a + 1. In order to figure out the connection to 1/17, it helps to extract the essential features of the first equality. So to find other solutions similar to this one, we may decide to substitute b = 4a + 1 into the equation, giving a^2 + (4a + 1)^2 = 10000a + 4a + 1. This gives us the quadratic equation 17a^2 - 9996a = 0.
The two solutions are a = 0 and a = 588, the latter of which is 9996/17. So we recovered our original solution. But why is the sum like the digits of 1/17? Well, 9996 = 10^4 - 4, so 1/9996 = 0.0001000400160064… follows the powers of 4. If we make a decimal that follows the powers of 4 times 588, we get 588/9996 = 1/17. The first 8 digits are 0588 followed by 588*4 = 2352, which is (almost) exactly the same digit sequence as our sum of squares.
The next example of this phenomenon occurs when b = 10a + 1, with 990^2 + 9901^2 = 99009901 = (10^10 + 1)/101. However, in this case, the concatenation is 5 digits, so an extra 0 needs to be placed in front of 9901. The next example after that is when b = 16a + 1, where a = (10^64 - 16)/257 and a^2 + b^2 = (10^128 + 1)/257.
···
Fact: 7^6 = 117649, and 117647 are the first 6 digits of 2/17.
This one appears on the Wikipedia list of mathematical coincidences. Sometimes equivalent apparently coincidental statements are given instead, like 17*7^6 = 2*10^6 + 33. However, I found a somewhat satisfying explanation for it (in my opinion) when thinking in different bases.
The coincidence can be given as 2*10^6 ~= 7^6*17. Specifically, the fact that 117649 is close to the last 6 digits of 2/17 is really saying that the number itself is close to 2*10^6/17. Now, 2*10^6 = 2^7*5^6 can be refactorized as 50^3*16. Let's look at this in base 7.
50 = 7^2 + 1, so 50 in base 7 is 101_7. Using Pascal's triangle to expand (x + 1)^3, we get that 50^3 in base 7 is 1030301_7. Multiply this by 16, which is 22_7, and you get 22666622_7. This is remarkably close to 23000000_7, which is 17*7^6.
Maybe this doesn't explain the coincidence as part of a "natural" pattern, but at least it seems like a collision of diverse circumstances rather than a freak accident of matching digits. Row 3 of Pascal's triangle has repeated digits in the middle, those digits are a factor of the base (7) minus one, and the value (7^2 - 1)/3 just happens to have a subset of the prime factors of 7^2 + 1.
The ultimate test of whether such an explanation is sufficient is if it allows us to find analogous patterns in other bases. Let's try base 4. We have 101_4 = 17, 1030301_4 = 17^3, and 11333311_4 = 17^3*5 = 24565 is close to 12000000_4 = 6*4^6 = 24576. Unfortunately, 5 and 17 are coprime, so 17^3*5 isn't nearly as nice as 50^3*16.
We can even try the same thing in base 10. We have 101^3 = 1030301, 101^3*33 = 33999933, and 34*10^6 = 34000000. However, the only larger relevant base here is base 101, because 101 is prime. So this isn't nearly as interesting as what happens in bases 7 and 10.
As a bonus, this explains why one of the approximations to sum(7^(i - 1)/10^i, i=1..infinity) looks like 5/17. We have sum(7^(i - 1)/10^i, i=1..infinity) = 1/3, but sum(7^(i - 1)/10^i, i=1..6) = 0.294117, the first 6 digits of 5/17. This is equivalent to sum(10^i*7^(5 - i), i=0..5) ~= 5/17*10^6. This is true because 7^6 ~= 2/17*10^6 implies 10^6 - 7^6 = 15/17*10^6, and sum(10^i*7^(5 - i), i=0..5) = (10^6 - 7^6)/3.
···
Fact: 1/41 = 0.024390243902439… has an unusually short period of 5 in base 10.
All primes p other than 2 or 5 have a reciprocal with a repeating period in base 10. This period is always some factor of p - 1, and usually seems to be pretty large. However, if p divides some small repunit (number made out of ones), the period can be shorter.
For some short-period primes, the reason the period is so short is clear. 1/11 = 0.090909… has a period of 2 digits because 11 is a 2-digit repunit. 1/37 = 0.027027027… has a period of 3 digits because it's obvious 111 is divisible by 3 (its digits sum to 3) and 111/3 = 37.
However, 1/41 has a period of 5 digits because 41*271 = 11111, and the primes 41 and 271 look very random, with no reason why they would have to be this way. It turns out that repunits of prime length (and more generally, cyclotomic polynomials at n = 10) factoring into random-looking prime factors is the rule, not the exception, but for someone new to repeating decimals it might be tempting to try to make a connection between this short period and some mathematical propery of the number 41.
As a matter of fact, some partial explanation does exist. Because 41 divides 11111, it also divides 99999. (For those unfamiliar with the math behind repeating decimals, this is the direct reason 1/41 has a 5-digit period at all: because 1 = 0.999… can be divided into chunks of 5 digits as 0.99999 99999 99999 … and each chunk can be divided by 41.) Because 41 divides 99999, it also divides 99999 + 41 = 100040. Because 41 doesn't divide 10, it must divide 10004. (We can also use this trick to show that if k divides 10^n - 1, k also divides each of the n-digit cyclic permutations of k. This is why cyclic numbers like 142857 exist.)
The number 10004 seems worthy of interest, because the polynomial n^4 + 4 factors as (n^2 - 2n + 2)(n^2 + 2n + 2). If we can find a theoretical reason why this would lead to a number of the form n^4 + 4 being divisible by 4n + 1, that would explain why certain numbers have reciprocals with period 5 in some bases. We might also notice that 41*61 = 2501 = 50^2 + 1, and 41 and 61 are oddly "symmetric" around 51, whereas most numbers one above squares don't have simple patterns in their factorization. This is related to the above, because 2501 = 10004/4.
As it turns out, when n = 10, the polynomial factorization becomes 10004 = 82*122. Then 82 = 2*41, so this can be refactored as 41*244. So the ultimate reason this seems to happen in base 10 is that 4 = 2^2 and also 4*2 = 10 - 2.
Of course, this is just one explanation. It breaks the "coincidence" into a lot of steps, but it's not obvious why all the steps should even exist. It could be seen as just "explaining" the coincidence with another coincidence. However, we can generalize this construction to find a family of period-5 reciprocals in other bases.
The factorization n^4 + 4 = (n^2 - 2n + 2)(n^2 + 2n + 2) is part of a general pattern of factorizations n^4 + 4k^4 = (n^2 - 2kn + 2k^2)(n^2 + 2kn + 2k^2). Let's assume we're working in base-n with an arbitrary k, and 4k^4 < n so 4k^4 is a single digit. Then the number n^4 + 4k^4 is a cyclic permutation of 4k^4*n + 1.
By analogy, we would want 4k^4*n + 1 to be a divisor of n^2 - 2kn + 2k^2, just like 41 divides the factor 82. The simplest way to do this is to let the quotient be 2k^2 (the ratio of the last digits), which means we want 4k^4*2k^2 = 8k^6 = n - 2k. So we choose our base n = 8k^6 + 2k. (Note that when k = 1, this equals 10.) Now 4k^4*n + 1 divides n^4 + 4k^4, which means it divides n*(n^4 + 4k^4) - (4k^4*n + 1) = n^5 - 1. Thus, 4k^4*n + 1 has period 5 in base n = 8k^6 + 2k. (Note that a divisor of n^5 - 1 could also have period 1, but 4k^4 + 1, being two digits long, is too small to have period 1 without nonrepeating digits at the beginning.)
After 41, the second smallest number with this property is 33025 in base 516. In this base, the number 33025 is written with the digits 64:1. 1/33025 has the expansion 0.0:8:32:63:515:0:8:32:63:515…. As it turns out, 33025 = 5^2*1321, and the full factorization of 516^5 - 1 is 5^2*103*521*1321*20641.
···
Fact: 2^10 = 1024 is close to 10^3 = 1000.
This is pretty well known, as it is the basis for the names of a lot of units used in computing. A kilobyte, for instance, could mean 1000 or 1024 bytes, and a <prefix 10^(3n)>-byte could mean either 10^(3n) or 2^(10n) bytes. Even more remarkable is the repeated appearance of 10, which happens to be the base of our number system. This leads to further coincidences involving families of powers of 2 sharing both the same first and last digits, as the last 2 digits of powers of 2 repeat with period 20. Example: 256, 268435456, 281474976710656, ….
Most people, including Wikipedia, generally think there is no further explanation behind this coincidence. However, I can offer an explanation that removes at least a little bit of the mystery. First, many people try to make the coincidence "simpler" by removing factors of 2^3 to turn it into 2^7 = 128 ~= 125 = 5^3. As remarkable as this is (see item #1), it gets rid of the shared appearance of 10 and is not the approach I'll be using here.
Instead, I'll be showing that 2^(5*2) is close to a multiple of 5^3 (note the repeated 5's, which can be derived from the repeated 10's in the original expression), and that this is part of a pattern in the 10th powers. First, n^5 = n (mod 5), which comes from Fermat's little theorem. As it happens, we can show something deeper about 5th powers: if n = 5k ± 1, then n^5 = 25k ± 1 (mod 5^3). This is because (5k ± 1)^5 = 3125k^5 ± 3125k^4 + 1250k^3 ± 250k^2 + 25k ± 1, and all the coefficients except the last two are divisible by 5^3. Furthermore, if n is an odd square, both n and n^5 are congruent to 1 mod 8, and we see that if 5k ± 1 = 1 (mod 8), then 25k ± 1 = 5(5k ± 1) -/+ 4 = 1 (mod 8) as well. Therefore, n^5 = 25k ± 1 (mod 8). If n is an even square, then n = 5k ± 1 is divisible by 4, and so 25k ± 1 is also divisible by 4. It thus follows that n^5 = 25k ± 1 (mod 4) in this case. Putting these results together, we see that if n = 5k ± 1 is an odd square, then n^5 = 25k ± 1 (mod 500), and in at least half of all cases this is true mod 1000 as well.
Now, if m is not a multiple of 5, then m^2 = 5k ± 1 for some k, and so the above result applies: (m^2)^5 = m^10 = 25k ± 1 (mod 500). In particular, 2^10 = 24 (mod 500). It just happens that 2^10 = 24 (mod 1000) as well, and the difference is 1000 itself.
Now we can generalize this to other bases. For m = 3, we have 3^2 = 9 = 5*2 - 1, and 25*2 - 1 = 49. In fact, we have 3^10 = 59*1000 + 49. So if anyone builds a ternary computer with memory that can be addressed by strings of 10 "trits", the ternary equivalent of bits, they can say it has 59 kilotrits of memory, even if it isn't exact.
We can generalize this to other bases in a different way as well. For the same reason n = 5k ± 1 implies n^5 = 25k ± 1 (mod 5^3), we also have n = pk ± 1 implies n^p = p^2*k ± 1 (mod p^3) for all primes p > 2. The expression (pk + 1)^p expands as sum(p^i*choose(p, i)*k^i, i=0..p). Because p > 2, the first term is divisible by p^3, and because choose(p, i) is divisible by p for 1 < i < p - 1, the terms up to the penultimate term are also divisible by p^3. Therefore, the last two terms, p^2*k + 1, are the value mod p^3. For (pk - 1)^p, the expansion is the same but with alternating signs. Because there are an even number of terms, the same reasoning tells us that the value mod p^3 is p^2*k - 1.
Now if m does not divide p, then m^((p - 1)/2) = ±1 (mod p). (This is because m^(p - 1) = 1 (mod p) by Fermat's little theorem, and the only possible square roots of 1 mod p are 1 and -1.) Therefore, if m does not divide p, then m^(p*(p - 1)/2) = p^2*k ± 1 = p*m^((p - 1)/2) -/+ (p - 1) (mod p^3).
As an example, 2^3 = 7 + 1 and 2^21 = 6114*7^3 + 7^2 + 1. However, this is not especially close to a multiple of 21^3 because 6114 isn't divisible by 27. None of these examples feel as "magical" as 2^10 ~= 10^3, so I would say this coincidence is only partly resolved.
···
Fact: The last 3-digit string to appear in a power of 2 is 000.
Explanation: I heard about this from the user Ecl1psed on the Googology and Apeirology server, and at first it looks like a 1 in 1000 chance. However, there may be some phenomenon at play that make this not quite as rare as it looks. Given a 3-digit string s in 2^n (interpreted as a number from 0 to 999), there are only two possible strings that can appear in 2^(n + 1) at the same position, namely 2s mod 1000 and 2s + 1 mod 1000. In the cases of s = 000 or s = 999 (and only in those cases), one of the possible strings at the same position in 2^(n + 1) is s itself. If the concatenation of the powers of 2 is a normal number (which I believe is conjectured to be the case), each 000 has a 1/2 chance of being followed by a 000 in the next power of 2, which has a 1/2 chance of being followed by a 000 in the next power of 2, and so on. So the expected number of consecutive occurrences of 000 is 2 (and same for 999) whereas most 3-digit strings cannot appear in the same position in two consecutive powers of 2. If the powers of 2 are short (not much longer than 50 or 100 digits), this means that the strings 000 and 999 have a greater-than-average chance of occurring multiple times close together. Again, if the concatenation of the powers of 2 is a normal number, all 3-digit strings appear with the same frequency. Because 000s tend to appear together, the distance to the first occurrence of 000 has a higher-than-average chance of being exceptionally long. In fact, we can make the same argument for the substring 00, which may further increase the variance in the distance between occurrences of 000.
···
Finally, here are some interesting coincidences that are related to each other, even though I haven't found a single unifying explanation for all of them.
We have the remarkable identity 3^10*109 + 2 = 23^5. This is, in fact, the abc-triple with the best known quality, first found by Eric Reyssat. As a consequence, 109^(1/5) is very close to 23/9, so close that it even starts with 2.555555…, and its continued fraction starts [2; 1, 1, 4, 77733, 2, 1, 1, 1, 3, 13, 1, 9715, 1, 3, 2, 1, 7, 1, 4, 52999, …]. (For those unfamiliar with continued fractions, they give you the closest rational approximations to a number by truncating the sequence to a certain number of terms. The larger the next term cut off, the better the approximation. The continued fraction for 23/9 is [2; 1, 1, 4]. The next term is 77733, which means that 23/9 is a very good approximation for 109^(1/5) as 77733 is a very large term to see in a continued fraction expansion that doesn't exhibit any special patterns. As a rule of thumb, a term that is greater or equal to n appears with a frequency of about 1/n terms.)
You might also notice the other large terms in the continued fraction, 9715 and 52999. These terms come from dividing especially good rational approximations to (23^5 - 2)^(1/5) by 9. I'm not sure, but I believe that those rational approximations can be derived from approximations to the function 23*(1 - 1/x)^(1/5) and substituting x = 23^5/2.
Another consequence of this identity is that 6436342^2 has the base-207 expansion 109:0:0:0:0:1. In base 207, the probability of a 6-digit string having four 0s is 8.1*10^-9, or 1 in 123 million, which is quite a bit bigger than 6436342. The next square to end in 0:0:0:0:1 in base 207 is 380053181465^2.
Expressing Repeating Decimals in Fraction Form
Express the following repeating decimal in fraction form: 9.090909... (09 repeating) To make a repeating decimal be in its fraction form, we have to create two equations: one where x is equal to the repeating decimal, and one where x is equal to the repeating decimal if it were before the decimal point. Begin by creating the first equation, where x equals the repeating decimal digits. x = 9.090909... We must have the non-repeating digits on the left side of the decimal point. To do so, you multiply both sides by a factor of ten. In this case, we do not need to multiply both sides by a factor of ten, because the only non-repeating digit, 9, is already on the left side of the decimal point. Next, we subtract the non-repeating digit from both sides. x = 9.090909... x - 9 = 0.090909... This is our first equation. Now we will create the second equation, where x equals the repeating decimal if the repeating digits were in front of the decimal point. x = 9.090909... To have all repeating digits before the decimal point, we must multiply both sides by a factor of ten. In this case, we multiply both sides by 100. x = 9.090909... 100x = 909.090909... Now we break a part the right side of the equation into two terms, one that stands alone, and another that is equal to the first equation we made. 100x = 909.090909... 100x = 909 + 0.090909... Since the first equation we made has x - 9 = 0.090909..., we substitute this in our second equation. 100x = 909 + 0.090909... 100x = 909 + x - 9 Simplify and solve for x, giving us the repeating decimal in fraction form. 100x - x = 900 x(100 - 1) = 900 x = 900/99 = 100/11 Express the following repeating decimal in fraction form: 3.2101010... (10 repeating) To make a repeating decimal be in its fraction form, we have to create two equations: one where x is equal to the repeating decimal, and one where x is equal to the repeating decimal if it were before the decimal point. Begin by creating the first equation, where x equals the repeating decimal digits. x = 3.2101010... We must have the non-repeating digits on the left side of the decimal point. To do so, you multiply both sides by a factor of ten. In this case, we need to multiply both sides by 10, because the non-repeating digit, 2, is on the right side of the decimal point. x = 3.2101010... 10x = 32.101010... Next, we subtract the non-repeating digit from both sides. 10x = 32.101010... 10x - 32 = 0.101010... This is our first equation. Now we will create the second equation, where x equals the repeating decimal if the repeating digits were in front of the decimal point. x = 3.2101010... To have all repeating digits before the decimal point, we must multiply both sides by a factor of ten. In this case, we multiply both sides by 1000. x = 3.2101010... 1000x = 3210.101010... Now we break a part the right side of the equation into two terms, one that stands alone, and another that is equal to the first equation we made. 1000x = 3210.101010... 1000x = 3210 + 0.101010... Since the first equation we made has 10x - 32 = 0.101010..., we substitute this in our second equation. 1000x = 3210 + 0._10 1000x = 3210 + 10x - 32 Simplify and solve for x, giving us the repeating decimal in fraction form. 1000x = 3210 + 10x - 32 1000x - 10x = 3178 x(1000 - 10) = 3178 x = 1589/495 Express the following repeating decimal in fraction form: 0.285714285714285714... (285714 repeating) To make a repeating decimal be in its fraction form, we have to create two equations: one where x is equal to the repeating decimal, and one where x is equal to the repeating decimal if it were before the decimal point. Begin by creating the first equation, where x equals the repeating decimal digits. x = 0.285714285714285714... We must have the non-repeating digits on the left side of the decimal point. To do so, you multiply both sides by a factor of ten. In this case, we have no non-repeating digits, so we do not need to create two equations but simply create the second equation, where x equals the repeating decimal if it were before the decimal point. To do so, we must multiply both sides by a factor of ten. In this case, we multiply both sides by one million. x = 0.285714285714285714... 1000000x = 285714.285714285714285714... Now we break a part the right side of the equation into two terms, one that stands alone, and another that is equal to the first equation we made. 1000000x = 285714.285714285714285714... 1000000x = 285714 + 0.285714285714285714... Since the first equation we made has x = 0.285714285714285714..., we substitute this in our second equation. 1000000x = 285714 + 0.285714285714285714... 1000000x = 285714 + x Simplify and solve for x, giving us the repeating decimal in fraction form. 1000000x = 285714 + x 1000000x - x = 285714 x(999999) = 285714 x = 2/7
Repeating Decimal
A decimal number that has digits that repeat forever. Examples: 1/3 = 0.333… (the 3 repeats forever) 1/7 = 0.142857142857… ( the "142857" repeats forever) 77/600 = 0.128333… (the 3 repeats forever) The part that repeats is usually shown by placing dots over the first and last digits of the repeating pattern, or sometimes a line over the pattern