Are the Digits in a Mersenne Prime Random? A Probability Model

Similar documents
Big doings with small g a p s

Discrete distribution. Fitting probability models to frequency data. Hypotheses for! 2 test. ! 2 Goodness-of-fit test

Class 24. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700


Introduction to Decision Sciences Lecture 10

CHAPTER 1 REAL NUMBERS KEY POINTS

Generalization of Pythagorean triplets, Quadruple Prof. K. Raja Rama Gandhi 1 and D.Narasimha murty 2

H 2 : otherwise. that is simply the proportion of the sample points below level x. For any fixed point x the law of large numbers gives that

AST 418/518 Instrumentation and Statistics

TUTORIAL 8 SOLUTIONS #

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

Any Wizard of Oz fans? Discrete Math Basics. Outline. Sets. Set Operations. Sets. Dorothy: How does one get to the Emerald City?

Chi Square Analysis M&M Statistics. Name Period Date

Lab #11. Variable B. Variable A Y a b a+b N c d c+d a+c b+d N = a+b+c+d

arxiv: v1 [math.co] 14 May 2008

Introductory Econometrics. Review of statistics (Part II: Inference)

B.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba

Strong Mathematical Induction

List of Symbols, Notations and Data

arxiv: v1 [math.gm] 23 Dec 2018

IE 303 Discrete-Event Simulation L E C T U R E 6 : R A N D O M N U M B E R G E N E R A T I O N

CONTINUED FRACTIONS Lecture notes, R. M. Dudley, Math Lecture Series, January 15, 2014

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

Euclid-Euler-Jiang Prime Theorem

Probability Methods in Civil Engineering Prof. Dr. Rajib Maity Department of Civil Engineering Indian Institution of Technology, Kharagpur

π π π points:= { seq([n*cos(pi/4*n), N*sin(Pi/4*N)], N=0..120) }:

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

String Matching. Thanks to Piotr Indyk. String Matching. Simple Algorithm. for s 0 to n-m. Match 0. for j 1 to m if T[s+j] P[j] then

One-to-one functions and onto functions

Context-free grammars and languages

Exam 3, Math Fall 2016 October 19, 2016

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

Hash tables. Hash tables

UNIT 5:Random number generation And Variation Generation

Classroom Activity 7 Math 113 Name : 10 pts Intro to Applied Stats

Data Analysis and Statistical Methods Statistics 651

Hash tables. Hash tables

Sociology 6Z03 Review II

Numbers and their divisors

Statistical Methods for Astronomy

How do we compare the relative performance among competing models?

The Alberta High School Mathematics Competition Solution to Part I, November 2015.

Subject CT4 Models. October 2015 Examination INDICATIVE SOLUTION

STT 843 Key to Homework 1 Spring 2018

CPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary

UNC Charlotte 2005 Algebra March 7, 2005

Chapter 7 Comparison of two independent samples

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

COM S 330 Lecture Notes Week of Feb 9 13

1. If X has density. cx 3 e x ), 0 x < 0, otherwise. Find the value of c that makes f a probability density. f(x) =

PEN H Problems. n 5 = x 2 +y 2 +z 2 +u 2 +v 2 = xyzuv 65. (x+y) 2 2(xy) 2 = 1. x 3 +y 3 +z 3 +t 3 = 1999

Math 152. Rumbos Fall Solutions to Exam #2

Introduction to Statistical Inference

Statistics 224 Solution key to EXAM 2 FALL 2007 Friday 11/2/07 Professor Michael Iltis (Lecture 2)

Math Wrangle Practice Problems

COMP Intro to Logic for Computer Scientists. Lecture 15

You separate binary numbers into columns in a similar fashion. 2 5 = 32

CHAMP presentation #1 September 9, 1pm. Ms. Leigh

Lecture 21: October 19

UNC Charlotte Algebra Competition March 9, 2009

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

The Chi-Square Distributions

QUESTION ONE Let 7C = Total Cost MC = Marginal Cost AC = Average Cost

Uniform random numbers generators

1 Hypothesis testing for a single mean

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Divisibility of Natural Numbers

TWO HUNDRED CONJECTURES AND ONE HUNDRED AND FIFTY OPEN PROBLEMS ON FERMAT PSEUDOPRIMES (COLLECTED PAPERS)

MTH 202 : Probability and Statistics

Random Number Generators - a brief assessment of those available

Recommended questions: a-d 4f 5 9a a 27.

Probability and Statistics Notes

Part 1.) We know that the probability of any specific x only given p ij = p i p j is just multinomial(n, p) where p k1 k 2

Econ 325: Introduction to Empirical Economics

2008 Winton. Statistical Testing of RNGs

2013 University of New South Wales School Mathematics Competition

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Sequences. 1. Number sequences. 2. Arithmetic sequences. Consider the illustrated pattern of circles:

Dealing with the assumption of independence between samples - introducing the paired design.

All About Numbers Definitions and Properties

Summary of Chapters 7-9

PHP2510: Principles of Biostatistics & Data Analysis. Lecture X: Hypothesis testing. PHP 2510 Lec 10: Hypothesis testing 1

Studio 8: NHST: t-tests and Rejection Regions Spring 2014

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs

One-Way Analysis of Variance. With regression, we related two quantitative, typically continuous variables.

Probability Distributions Columns (a) through (d)

Some Thoughts on Benford s Law

Multiple Sample Categorical Data

Economics 520. Lecture Note 19: Hypothesis Testing via the Neyman-Pearson Lemma CB 8.1,

ARC 102. A: Pair. B: Ruined Square. DEGwer 2018/09/01. For International Readers: English editorial starts on page 6.

Some practice questions for CIMC.

What is proof? Lesson 1

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Pump failure data. Pump Failures Time

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Discrete Math I Exam II (2/9/12) Page 1

Number Theory and Graph Theory. Arithmetic functions and roots of unity

Calculate the volume of the sphere. Give your answer correct to two decimal places. (3)

Practice Problems Section Problems

Warm-Up Problem. Please fill out your Teaching Evaluation Survey! Please comment on the warm-up problems if you haven t filled in your survey yet.

Transcription:

Are the in a Are the in a Prime Random? October 11, 2016 1 / 21

Outline Are the in a 1 2 3 4 5 2 / 21

Source Are the in a This talk is my expansion of the blog post: Strings of in, gottwurfelt.com, Jan 28, 2016 3 / 21

Are the in a The objective is to investigate the robustness of a probability model in a simple amusing example. The modeled situation is mathematical, well-understood, and finite so the robustness can be examined. The modeled situation is not surrounded with physical, biological or economic context so that the modeling can be understood in a purely mathematical context. 4 / 21

Numbers Are the in a A number is a number of the form M(n) = 2 n 1, where n is an integer. The first few numbers are 1, 3, 7, 15, 31, 63, 127, 255,... (OEIS A000225). The number of decimal digits d in the number M(n) is d = log(2 n 1) + 1 0.30103n + 1. 5 / 21

Are the in a A prime is a number that is prime. primes were named for the French monk Marin, who studied these numbers more than 350 years ago. There are only 49 known primes. The most recently discovered (January 7, 2016) prime is M(74,207,281), with 22,338,618 digits. 6 / 21

Composites Are the in a In order for M(n) to be prime, n must itself be prime. This is true since for composite n with factors r and s, 2 rs 1 = (2 r 1)(2 (s 1)r + 2 (s 2)r + + 2 r + 1). 7 / 21

Some Sample Are the in a Order p 1 3 2 7 3 31 10 89 27 61897001964269013 11 107 33 16225927682921336339157 12 127 39 17014118346046923173168730371 25 21701 6533 8 / 21

Are digits of primes random? Are the in a Not in base-2! M(p) = 111... 11 But what about the distribution of digits in base-10? 9 / 21

Distribution of Are the in a M 25 = M(21701) has 6533 digits, expect about 650 of each digit. 0 1 2 3 4 5 6 7 8 9 657 703 678 682 596 667 655 627 616 652 > chisq.test(digitcount) Chi-squared test for given probabilities data: digitcount X-squared = 14.505, df = 9, p-value = 0.1055 10 / 21 So we fail to reject the null hypothesis that the digits are random (uniformly distributed).

Distribution of Pairs Are the in a M 25 = M(21701) has 6532 2-digit sequences, expect about 65 of each pair. 00 01 02 03 04 05 06 07 08 09... 99 60 79 65 72 49 69 62 55 64 82... 41 chisquare(bidigitcounter) (114.90753214941824, 0.13096183796521524) So again we fail to reject the null hypothesis that the digits are random (uniformly distributed). 11 / 21

Distribution of Triplets Are the in a M 25 = M(21701) has 6531 triples, expect about 6 of each. 000 001 002 003 004 005 006 007 008 009 12 7 6 6 3 3 5 9 5 4 chisquare(tridigitcounter) (1048.0843668657174, 0.13665363987944268) Still we fail to reject the null hypothesis that the digits are random (uniformly distributed). 12 / 21

Distribution of Quadruples Are the in a Of the 10,000 possible 4-tuples, only 4,777 are seen in M 25 = M(21701). No longer uniformly distributed. Now we see what is happening: The number of spaces available to hold n-tuples is 6533 n + 1 but the number of possible n-tuples is 10 n. For large enough n, there are more possible n-tuples than available n-tuples in M(p). Not all possible n-digit tuples will be represented. 13 / 21

Probability of a tuple Are the in a For example, let a random 4-tuple be specified. Assume the probability of seeing this string in the first 4 places is 10 4. Ignore: 0 can t be in leading position, only have odd digits in last position possibility of something like Benford s Law 14 / 21

Independence Are the in a Also we have some information about P[abcd in positions 2,3,4,5 abcd in positions 1,2,3,4] So no independence! Assume that the probability of seeing this specified 4-tuple in any 4 consecutive digits is independent of the probability of seeing it in any other 4 consecutive digits. (This is a false assumption! ) 15 / 21

Binomial Are the in a Let the number of digits in M(p) be d. Then using the independence assumption the probability distribution of the number of appearances of this n-tuple is Binomial(d n + 1, 10 n ). Since d n + 1 d and the probability is small, use the Poisson approximation: v Binomial(d n + 1, 10 n ) Poisson(d/10 n ) 16 / 21

Probability Calculation Are the in a The probability of never seeing this 4-tuple is then P[k = 0] e d/10n, so the probability of encountering this 4-tuple at least once in M(p) is then 1 e d/10n. For d = 6533, n = 4 the probability is 0.47967. 17 / 21

Another Binomial Are the in a Suppose that the probability of seeing an n-tuple is M(p) is π. Then a binomial model for the number of successes (seeing an n-tuple in M(p)) among the 10 n trials is: Binomial(10 n, π) We expect 10 n π successes with a variance of 10n π(1 π). This means we expect accuracy in the first half of the digits of 10 n π. 18 / 21

Example Are the in a Prime p = 74,207,281. d 0.30103p 22,338,551 (1 exp( d/10 7 )) 10 7 8928853 (1 exp( d/10 8 )) 10 8 20019354 The digits of M(74,207,281) contain exactly 8,929,592 distinct seven-digit substrings, and exactly 20,021,565 distinct eight-digit substrings. 19 / 21

Summary Are the in a The digits of the are not random, but they act like they are. In fact, the distribution of small tuples of digits can be effectively modeled as though they are random with appropriate distributions. The model is robust even though the assumptions of constant probability and independence are not satisfied. 20 / 21

Future Directions Are the in a Consider the model in a context of a constructed random sequence of digits, where it is already known that the sequence is truly random. Consider a 100 100 Markov Chain transition matrix of probability of going from one 2-tuple to the next adjacent 2-tuple in the random string. Investigate the mixing properties of this transition matrix in order to put better bounds on the independence hypothesis. 21 / 21