# Decimal Representation of 1/7

**URL:** <https://boards.straightdope.com/t/decimal-representation-of-1-7/673379>\
**Category:** Factual Questions\
**Created:** [November 8, 2013, 2:49am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379 "2013-11-08T02:49:49Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![truthSeeker2](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@truthSeeker2](https://boards.straightdope.com/u/truthSeeker2)\
**Post date:** [November 8, 2013, 8:24am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/21 "2013-11-08T08:24:54Z")

</div>

**Askthepizzaguy**  
means x[sup]2[/sup] - (x-1)[sup]2[/sup] + 1 = 2x

---

<div class="post-metadata">

**Author:** ![Askthepizzaguy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/askthepizzaguy/32/9405_2.png) [@Askthepizzaguy](https://boards.straightdope.com/u/Askthepizzaguy)\
**Post date:** [November 8, 2013, 8:26am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/22 "2013-11-08T08:26:55Z")

</div>

> [@truthSeeker2](#):
>
> **Askthepizzaguy**  
> means x[sup]2[/sup] - (x-1)[sup]2[/sup] + 1 = 2x

It was something I noticed about numbers when I was 6 or 7 years old, back when I thought learning was still fun.

School taught me otherwise. 😛

---

<div class="post-metadata">

**Author:** ![truthSeeker2](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@truthSeeker2](https://boards.straightdope.com/u/truthSeeker2)\
**Post date:** [November 8, 2013, 8:39am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/23 "2013-11-08T08:39:56Z")

</div>

> [@Askthepizzaguy](#):
>
> It was something I noticed about numbers when I was 6 or 7 years old, back when I thought learning was still fun.

Nice.🙂

> [@](#):
>
> School taught me otherwise. 😛

Right. School can be about cramming many times which is understandable given the amount of stuff thats needed to be taught in limited time and plus number of students in class.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 8, 2013, 9:31am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/24 "2013-11-08T09:31:29Z")

</div>

Another magic trick based on 1/7 – though it uses only integer arithmetic, not fractions, involves preparing a paper slip with 142857 _glued into a loop_. Your target picks a number, does some arithmetic, and – presto – sees his number after you apply scissors judiciously.

> [@JWT\_Kottekoe](#):
>
> Years ago, Martin Gardner did a column on these so-called cyclic numbers. The same thing happens with 1/17, 1/19, and some other reciprocals of prime numbers.

7 works because it divides 999999 (six 9’s), but no shorter 9-strig; 7 = 1+six  
Similarly, 17 divides 9999999999999999 (sixteen 9’s), but no shorter 9-string; 17 = 1+sixteen  
1/13 repeats only 6 times as it marches 2/13, 3/13 etc. 13 divides twelve 9’s _but it also divides six 9’s_.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 8, 2013, 9:38am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/25 "2013-11-08T09:38:22Z")

</div>

> [@yearofglad](#):
>
> I’m not exactly sure that I have a specific _question_, but I’m curious if anyone has anything interesting or informative about the strange decimal representation of 1/7.
> 
> 1/7 = 0.142857142857…
> 
> The repeating portion consists of the digits 142857. If we break those up into three 2-digit numbers, we get 14, 28, and 57.
> 
> 28 is twice 14, and 57 is _almost_ twice 28. (Also, 14 is twice 7, the original denominator.)

Yes, in fact, if you kept doubling and moving 2 digits to the right you’d get

```auto

0.14
0.0028
0.000056
0.00000112
0.0000000224
...

```

These sum to 1/7. The spillover from 112 being 3 digits long is what explains getting 57 instead of 56, and so on.

Why do these sum to 1/7? Well, what do you get when you start with x and keep doubling and moving 2 digits to the right? You get k, where k = x + 2k/100; that is (applying basic algebra), you get 50/49 \* x. In the specific case where x = 0.14 (i.e., 7/50), this comes out to 1/7.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 8, 2013, 10:43am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/26 "2013-11-08T10:43:42Z")

</div>

> [@etv78](#):
>
> Are cyclical numbers always prime?

> [@snailboy](#):
>
> By cyclical, I’m guessing you mean non-terminating with a repeating pattern. In that case, no. Any divisor that doesn’t have solely 2 and/or 5 as prime factors and doesn’t divide evenly into the dividend will have a repeating pattern.

No, they mean cyclical numbers in the sense that non-integer multiples have the same periodic string of digits after the decimal point, only shifted. And, yes, every cyclical number in this sense is a fraction whose lowest-terms denominator is prime (or 1).

Why is that? Well, first of all, the fractional digits of a number are periodic just in case its fractional component is a multiple of a string of the form 0.000100010001… [with matching period]. And such a string satisfies the equation 10[sup]period[/sup] \* x = 1 + x, which can be solved to get x = 1/(10[sup]period[/sup] - 1); thus, a string has periodic fractional component just in case it is a rational number whose lowest terms denominator divides the difference between 1 and some positive power of 10 (i.e., just in case there is a positive power of 10 which is 1 modulo this denominator; i.e., just in case the powers of 10 form a periodic sequence modulo this denominator).

Next, writing out formally the definition of cyclicality, we see that such a fraction m/n in lowest terms is cyclical just in case for every integer f such that f \* m/n is not an integer, we have that there is some natural number p such that f \* m/n - 10[sup]p[/sup] \* m/n is an integer. That is (since m and n are coprime), every integer which is not divisible by n is a power of 10 away from a multiple of n. This amounts to the same thing as saying that every nonzero remainder modulo n is achieved by some power of 10.

Finally, why does this mean n cannot be composite? Well, we’ve now established that the powers of 10 form a periodic sequence which goes through every nonzero remainder modulo n (this sequence must also never hit zero modulo n (unless n = 1), or else it would stop being periodic and just be zero from then on out, never returning to its starting value of 1 (unless 1 = 0 modulo n, as only happens when n = 1)). Now assume for sake of contradiction that n is composite; then there are a and b less than n such that a \* b = n. But, modulo n, the left hand side is a product of nonzero values and thus a product of powers of 10 and thus itself a power of 10 and thus nonzero, but the right-hand side is zero. This is a contradiction, establishing that n cannot be composite.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [November 8, 2013, 3:21pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/27 "2013-11-08T15:21:12Z")

</div>

In base 2, 1/7 (or 1/111 to be consistent) is 0.001001001… That happens because it is 1 less than the cube of the base. Similarly, 1/11 (i.e. one third) = 0.010101…

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [November 8, 2013, 11:03pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/28 "2013-11-08T23:03:13Z")

</div>

The weird decimal expansion that most impresses me is:

1/37 = 0.027027027…

1/27 = 0.037037037…

(From Charles Fleischer’s classic [Moleeds](http://www.ted.com/talks/charles_fleischer_insists_all_things_are_moleeds.html) routine that is chock full of this stuff. Start a little after 14:00 in.)

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 8, 2013, 11:20pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/29 "2013-11-08T23:20:28Z")

</div>

I haven’t watched the routine, but this can be explained by the fact that 27 \* 37 = 999. Any other factorization of a string of 9s gives the same sort of thing, because (dare I say it?) 0.999999… = 1.

---

<div class="post-metadata">

**Author:** ![Malacandra](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Malacandra](https://boards.straightdope.com/u/Malacandra)\
**Post date:** [November 9, 2013, 8:00am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/30 "2013-11-09T08:00:20Z")

</div>

> [@Askthepizzaguy](#):
>
> It was something I noticed about numbers when I was 6 or 7 years old, back when I thought learning was still fun.
> 
> School taught me otherwise. 😛

Learning still is fun. Don’t let school convince you differently.

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [November 9, 2013, 4:00pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/31 "2013-11-09T16:00:00Z")

</div>

> [@Indistinguishable](#):
>
> I haven’t watched the routine, but this can be explained by the fact that 27 \* 37 = 999. Any other factorization of a string of 9s gives the same sort of thing, because (dare I say it?) 0.999999… = 1.

Cool, so for 99999 you have 271 and 369 whose inverses are 0.0036900369… and 0.0027100271…, resp.

(That 271 is 27_10+1 and 37_10-1 appears to be a semifluke. The next several blocks of 9s don’t seem to have similar factors.)

There’s something evil about 9s I tellz ya.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 9, 2013, 4:00pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/32 "2013-11-09T16:00:30Z")

</div>

> [@](#):
>
> I haven’t watched the routine, but this can be explained by the fact that 27 \* 37 = 999. Any other factorization of a string of 9s gives the same sort of thing, because (dare I say it?) 0.999999… = 1.

Right, similarly, 1/9 = 0.1111…, and 1/11 = 0.09090909…, because 9\*11 = 99.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 9, 2013, 4:01pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/33 "2013-11-09T16:01:51Z")

</div>

> [@](#):
>
> There’s something evil about 9s I tellz ya.

It’s just because they’re 1 less than the number base we use. If we used base nine, then we’d notice similar eerie patterns about 8.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 9, 2013, 5:35pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/34 "2013-11-09T17:35:49Z")

</div>

> [@ftg](#):
>
> That 271 is 27_10+1 and 37_10-1 appears to be a semifluke.

Well, semi. Whenever A \* B = a string of 9s, with B - A = 10, you’ll have that (A \* 10 + 1) \* (B \* 10 - 1) = 100AB + 10(B - A) - 1 = …99900 + 100 - 1 = …99999 is also a string of 9s. [And the analogue in any base, taking string of 9s to mean 1 less than a power of 10; everything I’ve said in this thread has been essentially base-independent]

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 9, 2013, 5:37pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/35 "2013-11-09T17:37:11Z")

</div>

> [@Chronos](#):
>
> Right, similarly, 1/9 = 0.1111…, and 1/11 = 0.09090909…, because 9\*11 = 99.

Also similarly: 1/9 = 0.1111…, and 1/1 = 0.9999…, because 9 \* 1 = 9.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [November 9, 2013, 6:06pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/36 "2013-11-09T18:06:49Z")

</div>

> [@Indistinguishable](#):
>
> […] because (dare I say it?) 0.999999… = 1.

> [@Indistinguishable](#):
>
> Also similarly: 1/9 = 0.1111…, and 1/1 = 0.9999…, […]

You’re just begging for a hijack aren’t you? 😉

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 9, 2013, 7:25pm UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/37 "2013-11-09T19:25:06Z")

</div>

Or, for that matter, 1/3 = 0.333… and 1/3 = 0.333…

---

<div class="post-metadata">

**Author:** ![Enola\_Straight](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Enola\_Straight](https://boards.straightdope.com/u/Enola_Straight)\
**Post date:** [November 10, 2013, 1:49am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/38 "2013-11-10T01:49:43Z")

</div>

> [@etv78](#):
>
> Are cyclical numbers always prime?

A better question is:

Are cyclical numbers always non-constructable-by-compass-and-straightedge polygons?

> **[Constructible polygon](https://en.wikipedia.org/wiki/Constructible_polygon)**
>
> In mathematics, a constructible polygon is a regular polygon that can be constructed with compass and straightedge. For example, a regular pentagon is constructible with compass and straightedge while a regular heptagon is not. There are infinitely many constructible polygons, but only 31 with an odd number of sides are known.
> Some regular polygons are easy to construct with compass and straightedge; others are not. The ancient Greek mathematicians knew how to construct a regular polygon with 3,...

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [November 10, 2013, 2:14am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/39 "2013-11-10T02:14:51Z")

</div>

Edit: ignore this post.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [November 10, 2013, 2:34am UTC](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379/40 "2013-11-10T02:34:50Z")

</div>

> [@Enola\_Straight](#):
>
> A better question is:
> 
> Are cyclical numbers always non-constructable-by-compass-and-straightedge polygons?  
> [Constructible polygon - Wikipedia](http://en.wikipedia.org/wiki/Constructible_polygon)

1/7 is constructible.

[Previous page](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379.md?page=1)

[Next page](https://boards.straightdope.com/t/decimal-representation-of-1-7/673379.md?page=3)
