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

Reference Material

prev

It's not useful to know the factors of these numbers, I was just curious.

28989
38897   127
488893   2963
588889103   863
688888967   13267
788888893   2962963
888888889251   354139
98888888897   23   29   61   3121
10888888888934   172   379721

The nine-digit number has a lot of small factors, that's nice. Also the ten-digit number has some nice powers.

What's up with 2963 and 2962963? Well, one way to think about it is to say that 888 / 3 = 296, problem solved. A more interesting way is to imagine that the decimal point is at the start instead of the end. The number 0.8 is 8/9, so dividing by 3 should give us 8/27. However, because 27 × 37 = 999, we know that

1/27 = 37/999 = 0.037,

so

8/27 = 296/999 = 0.296.

The same thing works for every third number, including the ten-digit number. Dividing by 3 gives 2962962963 (not prime), and dividing by 3 again gives 987654321. No kidding! By the argument above, that number should be related to 8/81, and sure enough …

1/81 = 0.012345679
8/81 = 0.098765432.

I think I've known about the strange expansion of 1/81 since high school. I mentioned it in Logarithmic Forms, but somehow not in Fractions. Since I'm already explaining strange things, here's an explanation for it that I'm not sure I ever noticed before. The first few digits look like this sum, right?

s = sum ( j / 10j+1 )

But, we can get rid of the linear growth by shifting and subtracting,

10s − s = 0.1 = 1/9,

and as a result the entire sum is actually equal to 1/81.

It's more useful to know the factors of numbers like 999998. (For numbers like 999999, see Repunits.)

22982   72
239797
249625   3
25955   19
 
329982   499
33997997
3499622   3   83
359955   199
 
4299982   4999
43999713   769
44999622   3   72   17
4599955   1999
 
52999982   49999
5399997192   277
549999622   3   13   641
55999955   7   2857
 
629999982   31   1272
63999997757   1321
6499999622   3   167   499
659999955   199999
 
7299999982   4999999
7399999977   1428571
74999999622   3   191   4363
7599999955   17   71   1657
 
82999999982   7   23   310559
83999999971297   77101
849999999622   3   1667   4999
85999999955   19999999
 
929999999982   691   723589
9399999999771   2251   6257
9499999999622   3   83333333
959999999955   89   1447   1553
 
10299999999982   17   14033   20959
103999999999713   769230769
104999999999622   3   7   2381   49999
10599999999955   31   64516129

Here's the question I want to investigate: how strange is it that 999998 is divisible by 1272? Let's start by making a table of how many of the numbers above are divisible by p2 for different values of p. The expected count is 36/p2 because there are 36 numbers above and the probability of a random number being divisible by p2 is 1/p2.

pexpectedactual
299
340
51.440
70.73472
110.29750
130.21300
170.12460
190.09971
 
1270.00221

Of course, the numbers above aren't exactly random.

  • For p = 2, the fact that the numbers come in blocks of four means that we're guaranteed to get exactly the expected count.
  • For p = 3 and 5, the way the numbers are tied to powers of 10 forces the actual counts to zero.
  • For p = 7, the hit at 9996 doesn't really count because it's a consequence of the hit at 98 and the following identity.

    98 × 102 = 102 × 102 = 10004 = 9996

There are some other complications that I'm going to mention and then mostly ignore, and there are probably further complications that I haven't even thought of.

  • There are three other identities with the same form.

    (10k − 2)(10k + 2) = 102k − 4

    They don't force any hits, but they do still create correlations, and not the ones you might expect. For example, if 10k − 2 contains one factor of p ≠ 2, what's the probability that 102k − 4 contains two or more factors of p? Zero! The difference between 10k + 2 and 10k − 2 is 4, so the only possible common factor is 2.

  • When p ≥ 100 (a range I'm interested in), all the numbers less than 104 are simply too small to be divisible by p2.
  • The last two points can be combined. When p ≥ 100, the numbers of the form 102k − 4 that are less than 108 can't be divisible by p2.

The conclusion I choose to draw here is that when p ≥ 10, the numbers are random enough.

The table of expected and actual counts is a good point of reference, but it's obviously wrong to compare the expected and actual counts for p = 127 in isolation because we shouldn't know in advance that 127 is the prime of interest. Fortunately, that just means we need to consider ranges of primes. Let's start with the range of all primes p ≥ 10. The sum of expected counts converges (see How Many Exceptions), and the result is … 1.1062. So, the fact that there are two hits (at 19 and 127) is somewhat unexpected.

Now let's split that range at a semi-arbitrary point.

  • For primes 10 ≤ p < 100, the sum is 1.0407, so the hit at 19 is almost exactly what you'd expect.
  • For primes p ≥ 100, the sum is 0.0655, so the hit at 127 is quite unexpected.

We can get a more accurate number for the second case by taking the other complications into account. The complications exclude 16 of the 36 numbers, so the expected count is really 0.0655 × 20/36 = 0.0364. Then, because essentially all the weight of the distribution is on 0 and 1, that number isn't just the expected count, it's also the probability of getting a hit. Just a 3.64% chance that any comparable event would happen … that's how strange it is that 999998 is divisible by 1272.

There are two other little things that interest me about the 36 numbers and their factors. First, I like how these decimal expansions peek through.

2499   4999   49999   4999999
519   199   1999   199999   19999999
71428571
13769   769230769

Honorable mention to this nice number.

99995= 5 × (7 × 2857)= 5 × 19999
= 7 × (5 × 2857)= 7 × 14285

Is it surprising that so many of the numbers like 199 and 499 are prime? Not really. The numbers aren't obviously composite (divisible by 2, 3, or 5), and a substantial fraction of such numbers are prime. The table in Number Line has all the details … except the detail that the substantial fraction is (8−N)/8.

Second, every way of viewing a decimal expansion as a geometric series has a group size and a ratio, so we can imagine using those properties to make an index of every possible way. The 36 numbers and their factors are the first (skipping group size 1) and most interesting part of that index. So, I did a quick survey and found two fun ways that I haven't mentioned on the site before.

This way of viewing the expansion of 1/7 is piquant because I'm so used to groups of three digits.

Maybe this way of viewing the expansion of 1/19 will help me remember it.

Finally, did you notice the flaw in the definition of “spicy”? A number is spicy if it's a divisor of 999998 … really? Any divisor? Is 2 spicy? Actually yes! Here's the expansion of 1/2 as a geometric series with six-digit groups and ratio 2. (Or you can start with 500001.)

And here's the expansion of 1/31.

At first it boggled my mind that the repeat length wasn't a multiple of the group size, but when I started to investigate, I realized that that's the rule, not the exception, at least for larger group sizes. Even for group size 2 the same thing happens … the table I made years ago in Other Denominators contains two expansions with repeat length 1 and one with repeat length 15. Apparently I just never noticed.

The halves of the six-digit groups are nearly powers of 2. That suggests another way of viewing the expansion of 1/31.

Since we have three-digit groups and ratio 8, the relevant denominator is 103 − 8 = 992 = 25 × 31 = 31.

Fun bonus fact: if you want to search for nice group sizes for 1/31 (or any other number), just work out the expansion by long division. The remainders are the ratios!

Somehow I've gotten all the way to the end without ever mentioning this lovely number.

1272 = 16129

Viewing the expansion of 1/31 as three-digit groups is unsatisfying after the first two groups, so let's go back to six-digit groups and try something else. Why are the halves of the six-digit groups nearly powers of 2? Because the halves of 16129 are.

1/31 = (2 × 1272) / 999998 = (2 × 16129) / 999998 = 32258/999998

And why are the halves of 16129 nearly powers of 2? I blame 1008. (No relation to 992 = 1008.)

1272 − 1 = (127 + 1)(127 − 1)=128× 126
=64× 252
=32× 504
=16× 1008 = 16128

One last shenanigan!

126 = 127 × 126 = 127 × (127 − 1) = 16129 − 127 = 16002 = 2 × 8001

 

  See Also

@ June (2021)