Home

> urticator.net
  Search

  About This Site
> Domains
  Glue
  Stories

  Computers
  Driving
  Games
  Humor
  Law
  Math
> Numbers
  Science

  Powers and Fractions
  Notes About Squares
> Decimal Expansions (Section)
  Number Maze
  Primes
  Divisibility
  Intrinsic Nature of Primes
  Other Topics
  Other Topics (2)

  Decimal Expansions
  Repeat Length Again
  The Nagell-Ljunggren Equation
> A Digression

  On Rounding
> Explanations
  Reference Material

Explanations

prev

Well, that's more than enough padding. Now let's go straight to the key fact. As explained in Other Denominators (a.k.a. “certain facts”), when you have a decimal expansion that looks like a geometric series, you can just read off what fraction it is. In this case …

1/127 = 0.007874 015748 031496 062992 125984 251968 503937

… we're looking at six-digit groups, and the ratio is 2, so the denominator is 106 − 2.

1/127 = 7874/999998

We also already know that 7874 is divisible by 127. A bit more factoring and a bit of rearranging give us the key fact.

999998 = 2 × 31 × 1272

That's where most of the strangeness comes from, that 999998 happens to be divisible by 1272.

Why is the number 127 involved at all? In short, because one inch is exactly 25.4 mm and 254 = 2 × 127. To be more specific, the exact value e that a and b are approximations to is 160 mm, and in inches that's 160/25.4 = 800/127.

So, that's the big picture. Now let's review all the strange things and see what else needs to be explained.

First, a quick definition: let's call a number spicy if it's a divisor of 999998. A fraction with spicy denominator generally has a decimal expansion that looks like a geometric series with six-digit groups and ratio 2.

In the calculation of d, we know 7874 is spicy, so it makes sense that 0.5 / (a − b) = 0.5 / 0.0007874 has the decimal expansion that it does, but something is still strange. The exact value e is a fraction with spicy denominator, but why is the difference of two approximations to e spicy? Well, if you look at the expansion of 1/127, you'll notice several spicy groups: a six-digit group at the start (since 999998 contains two factors of 127), a related five-digit group at the end, and negated copies of both that are easier to see if we use negative digits to show the complementary halves.

0.007874015748031496062992125984251968503937
0.007874015748032503937007874015748032503937
0.007874015748031496063007874015748031496063

So, if the first approximation ends at the start of a spicy group and the second ends at the end, then yes, the difference will be spicy. How likely is that?

  • For the first approximation, suppose the exact paper size is m/127 for random m.

    • 42/127 of the time, the decimal expansion of m/127 will be a rotated version of 1/127. (The rest of the time, there are no spicy groups in the expansion.)
    • Then, (8+4k)/42 of the time, we'll be within range of a spicy group if we allow up to k ≤ 3 decimal places in the approximation.

    So, the probability of getting a result as nice as the one we actually got (k = 1) is 12/127, or around 9%. I think we can say that that's genuinely a bit strange.

    On the other hand, it's not an accident that the particular value m = 800 leads to a rotated version. Multiplying 1/127 by 8 = 23 rotates the digits left by 3×6 = 18 places, and then multiplying by 100 shifts them left by two more.

  • Given success with the first approximation, it's always reasonable to have the second approximation go to the end of the spicy group, so success is guaranteed. As a bonus, the ends of the spicy groups are also the places where the number rounds most nicely. When I was writing Printer Theory, I didn't know about spicy groups, but I did see the nice rounding, and that's part of why I chose to take all the longer numbers to seven decimal places.

The other thing that needs to be explained is why da and db have those unusual values when d = 635. Let's start with an independent fact about 127 that I know from my study of products.

7 × 127 = 889

That may not look very promising, but if we break out the negative digits again and rewrite 889 as 1111, it becomes clear that shenanigans like this are possible.

63 × 127 = 9 × 7 × 127 = 11 × 1111 = 12001 = 8001

Then we just move some factors of 2 and 5 around and we have the equation for da.

da = 635 × 6.3 = 4000.5

Here's an alternate derivation suggested by the fact that 63 and 127 are 26 − 1 and 27 − 1.

63 × 127 = (64 − 1)(128 − 1) = (64 × 128) − (64 + 128) + 1 = 8192 − 192 + 1 = 8001

The nice cancellation of 192s at the end is essentially just the following equation multiplied by 8 (see Powers of 2 and 3).

1024 − 24 = 1000

That makes it seem like we should be able to do the same thing with other powers of 2, but in fact we can't. As far as I can tell it's just an odd coincidence.

Here's one more derivation. Knowing what we do about how to rotate and shift the decimal expansion of 1/127, it's clear that

8000/127 = 63 − 1/127,

and with a little rearrangement we get the same result. So, that “independent fact” is actually encoded in the decimal expansion.

What about the equation for db?

db = 635 × 6.2992126 = 4000.000001

We'll get there by an indirect path. First, let's see what happens if we use e instead of b in the calculation of d.

d= 0.5 / (a − e)
= 0.5 / ( 6.3 − 800/127 )
= 5 / ( 63 − 8000/127 )
= 5 / ( (8001 − 8000)/127 )
= 635

Yes, in another odd coincidence, the value of d that I obtained by ad hoc rounding is also the value of d at which the difference da − de is exactly 0.5. This is easy to confirm.

de = 635 × 800/127 = 4000

Next, here's a funny thing about fractions that I'd never really thought about before writing this essay. Suppose you have a fraction m/n.

  • Boring fact #1: if you round to the nearest integer, you're really just adding a small fraction r/n with |r| ≤ n/2 to make the numerator m+r divisible by n.
  • Boring fact #2: if you round to k decimal places, you're really just multiplying by 10k, rounding to the nearest integer, and then dividing by 10k.
  • Surprising consequence: if you round to k decimal places, you're really just adding (r/n) × 10−k.

When we're rounding e = 800/127 to seven decimal places to get b, here's the intermediate value.

62992126.015748031496063

Because we're at the end of a spicy group, where the number rounds nicely, we know that r is going to be especially small. In fact, r = 2 … we can deduce that from what we know about the decimal expansion of 1/127, or we can just observe that r/127 needs to be roughly 1.57/100.

Long story short, here's the exact relationship between b and e.

b = e + (2/127) × 10−7

And that's why db has the value that it does.

db − de = d(b − e) = 635 × (2/127) × 10−7 = 10−6

So, there are a lot of zeroes because b has a lot of decimal places, and the part at the end is 1 because in general the part at the end is 5r and we just happened to get the best possible value of r.

And that's that! All the strange things have been explained. The rest of this essay is just some notes and reference material.

next

 

  See Also

@ June (2021)