You will find here a few tables of random digits, used for simulation purposes and/or testing or integration in statistical, mathematical, and machine learning algorithms. These tables are particularly useful if you want to share your algorithms or simulations, and make them replicable. We also provide techniques to use in applications where secrecy is critical, such as cryptography, bitcoin or lotteries: in this case, you don't want to share your table of random numbers; to the contrary you want it to be secret and impossible to reverse-engineer.

Let's start with the largest table: one trillion digits, which takes 50 hours to download. You need to make sure you have enough disk space to store it. It consists of the first trillion digits of Pi, and it has passed all existing tests of randomness. To this date, no pattern has ever been found in that sequence. The table can be found here. Details about how these digits were computed can be found here and here.

An excellent book focusing on this problem is Mathematics by Experiment, written by Jonathan Borwein and David Bailey. Another book with a different, original perspective, is my book entitled *Applied Stochastic Processes, Chaos Modeling, and Probabilistic Properties of Numeration Systems*, available here.

Another approach for random number generation is to use the Mersenne twister. Its period is 2^19937 - 1. Or you may check out this website. Note that the digits of Pi do not have a period; in short, the period is infinite. Random digits based on physical phenomena have biases due to measurement errors, though these biases are so small that they do not matter.

**More accessible tables of random digits**

The following can easily be downloaded using the links below.

- 10 million digits of SQRT(2) in base 10. These are just as random of the digits of Pi. No formal proof of this fact exists; the most recent material on this topic is published here and here. You can download these digits here.
- 1 million digits of SQRT(2) in base 2. You can download these digits here.

I have performed some statistical analyses on these digits, see here. Simple formulas to compute these digits exist, see for instance here (read the last sentence in that article.) Testing whether digits are random or not, is further investigated in my free book, particularly in chapter 13. More can be found here.

Internet tools such as WolframAlpha can be used if you only need a small table. In particular, my 1 million digits table was produced interactively using SageMath.org. Instructions on how to do it are provided here. For more interactive calculators (for statisticians), check out this website.

**Random digits for strong encryption**

This topic is discussed at length in my free book published in June 2018. I still continue to work on this, and recently came up with some original concept, described below. You may use a numeration base that is not an integer to increase security, as described in my book, but even with a standard integer base such as binary or decimal digits, the following can be very useful.

Instead of considering the digits *a*(*n*) of a real number as being indexed by integers, consider extending the concept to values of *n* that are real numbers themselves. Then you use digits of Pi in positions that are not integers, say digits of Pi in positions SQRT(2), SQRT(3), and so on, rather than digits of Pi in positions number 1, 2, and so on. This is done as follows:

Here *x* is the number we are interested in (say *x* = Pi), *b* is the base, and *a*(*n*) is the *n*-th digit of *x* in base *b*. It corresponds to standard digits if *n* is an integer (assuming *b* is an integer), and non-standard digits if *n* is a real number, not an integer. The above formula, easy to prove, comes from Chapter 10 in my book.

Another context in which random digits (that can not be guessed), are required, is with lotteries. It is illustrated in this article.

*For related articles from the same author, click here or visit www.VincentGranville.com. Follow me on on LinkedIn, or visit my old web page here.*

**DSC Resources**

- Invitation to Join Data Science Central
- Free Book: Applied Stochastic Processes
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- Hire a Data Scientist | Search DSC | Classifieds | Find a Job
- Post a Blog | Forum Questions

© 2020 Data Science Central ® Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

**Upcoming DSC Webinar**

- DataOps: How Bell Canada Powers their Business with Data - July 15

Demand for data outstrips the capacity of IT organizations and data engineering teams to deliver. The enabling technologies exist today and data management practices are moving quickly toward a future of DataOps. DataOps is an automated, process-oriented methodology, used by analytic and data teams, to improve the quality and reduce the cycle time of data analytics. Register today.

**Most Popular Content on DSC**

To not miss this type of content in the future, subscribe to our newsletter.

- Book: Statistics -- New Foundations, Toolbox, and Machine Learning Recipes
- Book: Classification and Regression In a Weekend - With Python
- Book: Applied Stochastic Processes
- Long-range Correlations in Time Series: Modeling, Testing, Case Study
- How to Automatically Determine the Number of Clusters in your Data
- New Machine Learning Cheat Sheet | Old one
- Confidence Intervals Without Pain - With Resampling
- Advanced Machine Learning with Basic Excel
- New Perspectives on Statistical Distributions and Deep Learning
- Fascinating New Results in the Theory of Randomness
- Fast Combinatorial Feature Selection

**Other popular resources**

- Comprehensive Repository of Data Science and ML Resources
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- 100 Data Science Interview Questions and Answers
- Cheat Sheets | Curated Articles | Search | Jobs | Courses
- Post a Blog | Forum Questions | Books | Salaries | News

**Archives:** 2008-2014 |
2015-2016 |
2017-2019 |
Book 1 |
Book 2 |
More

**Upcoming DSC Webinar**

- DataOps: How Bell Canada Powers their Business with Data - July 15

Demand for data outstrips the capacity of IT organizations and data engineering teams to deliver. The enabling technologies exist today and data management practices are moving quickly toward a future of DataOps. DataOps is an automated, process-oriented methodology, used by analytic and data teams, to improve the quality and reduce the cycle time of data analytics. Register today.

**Most popular articles**

- Free Book and Resources for DSC Members
- New Perspectives on Statistical Distributions and Deep Learning
- Time series, Growth Modeling and Data Science Wizardy
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- How to Automatically Determine the Number of Clusters in your Data
- Fascinating New Results in the Theory of Randomness
- Hire a Data Scientist | Search DSC | Find a Job
- Post a Blog | Forum Questions

## You need to be a member of Data Science Central to add comments!

Join Data Science Central