A while back, I wrote an essay on the curious case of the interesting number paradox. While concluding this essay, I requested readers to share their favourite number(s). I got a few interesting entries in the comments section. Out of the whole lot, Fabiano Fagundes’s comment took the cake for me:
“Mine is 142857. No kidding. I love the only cyclic number in the decimal system.”
Until this point, I did not know about this number. So, naturally, I had to investigate. The deeper I dove in, the more interesting this number got. So, here we are.
I will start by sharing some of the interesting properties of this number. Following this, I will explain why this number is a cyclic number. Finally, I will touch upon the generalised notion of cyclic numbers. If you are interested in this sort of stuff, strap in, and let us begin.
The Mathematical Carousel
Let us start with the number in question: 142857
To begin, let me just arrange the digits that constitute this number in their ascending order as follows (note that we have 6 digits in total):
1, 2, 4, 5, 7, 8
Now, let us go back to the original number and multiply it by 1:
142857 * 1 = 142857
There are no surprises here. Any number multiplied by unity results in the same number. But just to make sense of the results that will shortly follow, note that this result starts with the smallest digit among the six digits (1).
Next, let us multiply the original number by 2:
142857 * 2 = 285714
This looks like a trivial result at first glance. But when you look closer, you might realise that this result is just a permutation of the number 142857 that starts with the second smallest digit among all the six digits.
Let us keep going. What happens if we multiply 142857 by 3?
142857 * 3 = 428571
We just ended up with another permutation of 142857. But this time, the cycle starts from the third smallest number (4). By this point, you should be able to predict what happens when we continue:
142857 * 4 = 571428 (starts with the fourth smallest digit (5))
142857 * 5 = 714285 (starts with the fifth smallest digit (7))
142857 * 6 = 857142 (starts with the sixth smallest digit (8))
Properties of the cyclic number — Math illustrated by the author
So, in essence, 142857 is an integer which results in cyclic permutations of its digits when multiplied by integers 1 through 6. What happens if we multiply it by 7, though? Let us find out.
What is so Special about 7?
142857 * 7 = 999999
That is interesting. This time, we don’t get cyclic repetition, but in turn, we get ‘9’ repeated 6 times. This result is closely related to why 142857 is a cyclic number in the first place. We will get there in a bit. But first, I will show you a few more interesting properties of this number that are related to this result.
Let us take the number 142857, break it up into two 3-digit numbers, and add them as follows:
142 + 857 = 999
How fascinating?! When we break the 6-digit number into two 3-digit numbers and add them, we get ‘9’ repeating 3 times.
What if we split 142857 into three 2-digit numbers and add them like so:
14 + 28 + 57 = 99
This time, we get ‘9’ repeating twice.
What if we cyclically break down 142857 into three 4-digit numbers and add them?
1428 + 5714 + 2857 = 9999
We get ‘9’ repeating 4 times. In case you are wondering why we added the 4-digit numbers thrice, we did this so that each digit was used the same number of times (in the previous two cases, each digit was used just once).
Now that we have seen the special case with 7, you might wonder what happens with numbers beyond 7. Let us address that question next.
The Fancy Merry-go-round Continues
Let us multiply 142857 by 8:
142857 * 8 = 1142856
This might also appear to be a trivial result at first glance. But if we take the last 6 digits and add the resulting number to the remaining digit(s), we will arrive at the following result:
1 + 142856 = 142857 (the cyclic number starting with the smallest digit)
We could keep going with the same approach:
142857 * 9 = 1285713
→ 1 + 285713 = 285714 (the cyclic number starting with the second smallest digit)
142857 * 10 = 1428570
→ 1 + 428570 = 428571 (the cyclic number starting with the third smallest digit)
And so on.
Just like before, something different happens when we multiply 142857 by 14:
142857 * 14 = 1999998
→ 1 + 999998 = 999999
What is so special about 14? That’s right — it is a multiple of 7!
The cyclic number — Illustrative art created by the author
Now that we have covered some of the interesting properties of the cyclic number 142857, let us see why this number is cyclic in the first place.
The Mathematical Origin
So far, we have established the cyclic nature of 142857 when multiplied by 1 through 6 and that something different happens when multiplied by 7. I also said that the result with 7 is closely related to why this number is cyclic. Now is the time to unravel the underlying reason.
Let us start by computing 1 divided by 7:
1/7 = 0.142857142857… (the first smallest digit appears after the decimal point)
That’s right. The fraction repeats our cyclic number infinitely after the decimal point. Next, let us multiply this by 10:
10/7 = 1.42857142857…
We can convert 10/7 into a mixed fraction as follows:
10/7 = 1 + 3/7 = 1.42857142857…
Subtracting 1 from both sides:
3/7 = 0.42857142857… (the third smallest digit appears after the decimal point)
That’s an interesting result, right? But let us keep going by multiplying this result by 10:
30/7 = 4.2857142857…
We can convert 30/7 into a mixed fraction as follows:
30/7 = 4 + 2/7 = 4.2857142857…
Subtracting 4 from both sides:
2/7 = 0.2857142857… (the second smallest digit appears after the decimal point)
Just to drive this point home, let me illustrate what happens when we multiply the above result by 10:
20/7 = 2.857142857…
20/7 can be expressed as a mixed fraction as follows:
20/7 = 2 + 6/7 = 2.857142857…
Subtracting 2 from both sides:
6/7 = 0.857142857… (the sixth smallest digit appears after the decimal point)
You could keep going by multiplying the above result by 10, and so on.
But in essence, the reason why 142857 is a cyclic number is the nature of fractions with 7 as the denominator. You can also look at this the other way around:
1/142857 = 0.000007000007…
If you are still wondering if 7 is special, it is not.
The Generalised Condition for a Cyclic Number
142857 just happens to be the first cyclic number. The next one is:
0588235294117647
This number has 16 digits and arises from the fraction 1/17 = 0.0588235294117647. Multiplication with 1 through 16 results in cyclic permutations, whereas multiplication with 17 results in ‘9’ repeating 16 times.
Now, what do 7 and 17 have in common? They are both prime numbers.
Let P be a prime number and X be an arbitrary cyclic number with an arbitrary number of digits
Cyclic numbers arise from primes with the following form (let this be Equation 1):
Equation 1 — Math illustrated by the author
As you can see the cyclic number repeats itself infinitely after the decimal point. When we multiply both sides with 10^(P-1), we get the following (Equation 2):
Equation 2 — Math illustrated by the author
Subtracting Equation 1 from Equation 2, we get:
General expression for a cyclic number — Math illustrated by the author
This is the formal expression/condition for cyclic numbers. Note that when you multiply the right-hand side with P, you would end up with 9 repeating (P-1) times. That is where the special results come from.
However, there is a catch: not all primes apply to this condition/expression! The applicable primes are called Full Reptend Primes and you can find a complete list of these here. As of now, we have no known algorithm to compute full reptend primes.
Similarly, you can find a list of all cyclic numbers here. But note that all numbers following 142857 must be considered with a leading zero. To figure out why, let us go back to Fabiano Fagundes’s original comment:
“Mine is 142857. No kidding. I love the only cyclic number in the decimal system.”
Note that he refers to 142857 being the ONLY cyclic number in the decimal system. The reason for this is that if we do not allow for numbers with a leading zero, 142857 is indeed the only cyclic number there is (in the decimal system). Contrary to what I said earlier, this fact makes the number 7 special after all.
And with that, I conclude this essay and hope that you enjoyed reading it.
If you’d d like to get notified when interesting content gets published here, consider subscribing.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-advertisement
1 year
Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent
1 year
Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Cookie
Duration
Description
_gat
1 minute
This cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duration
Description
__gads
1 year 24 days
The __gads cookie, set by Google, is stored under DoubleClick domain and tracks the number of times users see an advert, measures the success of the campaign and calculates its revenue. This cookie can only be read from the domain they are set on and will not track any data while browsing through other sites.
_ga
2 years
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_R5WSNS3HKS
2 years
This cookie is installed by Google Analytics.
_gat_gtag_UA_131795354_1
1 minute
Set by Google to distinguish users.
_gid
1 day
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
CONSENT
2 years
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duration
Description
IDE
1 year 24 days
Google DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile.
test_cookie
15 minutes
The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE
5 months 27 days
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSC
session
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devices
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-id
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Well written
Thank you very much!