On the missing values of n! mod p

Similar documents
Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

An arithmetic extension of van der Waerden s theorem on arithmetic progressions

ODD REPDIGITS TO SMALL BASES ARE NOT PERFECT

On the Subsequence of Primes Having Prime Subscripts

Odd multiperfect numbers of abundancy four

Flat primes and thin primes

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

SECOND-ORDER RECURRENCES. Lawrence Somer Department of Mathematics, Catholic University of America, Washington, D.C

DISTRIBUTION OF FIBONACCI AND LUCAS NUMBERS MODULO 3 k

6 CARDINALITY OF SETS

DISTRIBUTION OF THE FIBONACCI NUMBERS MOD 2. Eliot T. Jacobson Ohio University, Athens, OH (Submitted September 1990)

Sum and shifted-product subsets of product-sets over finite rings

Mathematics 220 Homework 4 - Solutions. Solution: We must prove the two statements: (1) if A = B, then A B = A B, and (2) if A B = A B, then A = B.

Part V. Chapter 19. Congruence of integers

Chapter 1 : The language of mathematics.

On the Composite Terms in Sequence Generated from Mersenne-type Recurrence Relations

Harmonic sets and the harmonic prime number theorem

Arithmetic properties of lacunary sums of binomial coefficients

MATH 201 Solutions: TEST 3-A (in class)

Math 109 September 1, 2016

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006

Expansions of quadratic maps in prime fields

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005

THE p-adic VALUATION OF LUCAS SEQUENCES

Homework 8 Solutions to Selected Problems

SOLUTIONS, what is the value of f(4)?

M381 Number Theory 2004 Page 1

A RESULT ON RAMANUJAN-LIKE CONGRUENCE PROPERTIES OF THE RESTRICTED PARTITION FUNCTION p(n, m) ACROSS BOTH VARIABLES

1 i<j k (g ih j g j h i ) 0.

Part IA Numbers and Sets

Extend Fermats Small Theorem to r p 1 mod p 3 for divisors r of p ± 1

On Integers for Which the Sum of Divisors is the Square of the Squarefree Core

Products of Factorials Modulo p

Math 564 Homework 1. Solutions.

1. Determine (with proof) the number of ordered triples (A 1, A 2, A 3 ) of sets which satisfy

GENERATORS OF FINITE FIELDS WITH POWERS OF TRACE ZERO AND CYCLOTOMIC FUNCTION FIELDS. 1. Introduction

1 Basic Combinatorics

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

The enumeration of simple permutations

The Chinese Remainder Theorem

arxiv: v1 [math.nt] 11 Jun 2017

Extension of continuous functions in digital spaces with the Khalimsky topology

Cullen Numbers in Binary Recurrent Sequences

Optimization using Calculus. Optimization of Functions of Multiple Variables subject to Equality Constraints

Smith theory. Andrew Putman. Abstract

CALCULATING EXACT CYCLE LENGTHS IN THE GENERALIZED FIBONACCI SEQUENCE MODULO p

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

MATH 2200 Final Review

1 Take-home exam and final exam study guide

Chapter-2 Relations and Functions. Miscellaneous

MATH 243E Test #3 Solutions

Representing numbers as the sum of squares and powers in the ring Z n

A talk given at University of Wisconsin at Madison (April 6, 2006). Zhi-Wei Sun

On arithmetic functions of balancing and Lucas-balancing numbers

Part IA Numbers and Sets

Elliptic Curves Spring 2013 Lecture #8 03/05/2013

CONGRUENCES RELATED TO THE RAMANUJAN/WATSON MOCK THETA FUNCTIONS ω(q) AND ν(q)

Department of Computer Science, University of Otago

ON THE SET a x + b g x (mod p) 1 Introduction

Fibonacci numbers. Chapter The Fibonacci sequence. The Fibonacci numbers F n are defined recursively by

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

#A67 INTEGERS 18 (2018) ON THE NESTED LOCAL POSTAGE STAMP PROBLEM

Partition of Integers into Distinct Summands with Upper Bounds. Partition of Integers into Even Summands. An Example

PODSYPANIN S PAPER ON THE LENGTH OF THE PERIOD OF A QUADRATIC IRRATIONAL. Copyright 2007

Notes on Systems of Linear Congruences

Congruences involving product of intervals and sets with small multiplicative doubling modulo a prime

Some zero-sum constants with weights

EGYPTIAN FRACTIONS WITH EACH DENOMINATOR HAVING THREE DISTINCT PRIME DIVISORS

Chapter 8. P-adic numbers. 8.1 Absolute values

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

0 Sets and Induction. Sets

New Multiple Harmonic Sum Identities

Introduction to Series and Sequences Math 121 Calculus II Spring 2015

Limits at Infinity. Horizontal Asymptotes. Definition (Limits at Infinity) Horizontal Asymptotes

The Jacobi Symbol. q q 1 q 2 q n

Named numbres. Ngày 25 tháng 11 năm () Named numbres Ngày 25 tháng 11 năm / 7

Sequences. Chapter 3. n + 1 3n + 2 sin n n. 3. lim (ln(n + 1) ln n) 1. lim. 2. lim. 4. lim (1 + n)1/n. Answers: 1. 1/3; 2. 0; 3. 0; 4. 1.

10x + y = xy. y = 10x x 1 > 10,

= (q) M+N (q) M (q) N

CS2800 Fall 2013 October 23, 2013

SOME CONGRUENCES ASSOCIATED WITH THE EQUATION X α = X β IN CERTAIN FINITE SEMIGROUPS

DIVISIBILITY AND DISTRIBUTION OF PARTITIONS INTO DISTINCT PARTS

(n = 0, 1, 2,... ). (2)

JUST THE MATHS UNIT NUMBER DIFFERENTIATION APPLICATIONS 5 (Maclaurin s and Taylor s series) A.J.Hobson

MATH 363: Discrete Mathematics

SOME CONGRUENCES FOR PARTITION FUNCTIONS RELATED TO MOCK THETA FUNCTIONS ω(q) AND ν(q) S.N. Fathima and Utpal Pore (Received October 13, 2017)

Colloq. Math. 145(2016), no. 1, ON SOME UNIVERSAL SUMS OF GENERALIZED POLYGONAL NUMBERS. 1. Introduction. x(x 1) (1.1) p m (x) = (m 2) + x.

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

On the number of elements with maximal order in the multiplicative group modulo n

1 2 3 style total. Circle the correct answer; no explanation is required. Each problem in this section counts 5 points.

ON THE LIMIT POINTS OF THE FRACTIONAL PARTS OF POWERS OF PISOT NUMBERS

New infinite families of congruences modulo 8 for partitions with even parts distinct

Zhi-Wei Sun Department of Mathematics, Nanjing University Nanjing , People s Republic of China. Received 8 July 2005; accepted 2 February 2006

PURELY PERIODIC SECOND ORDER LINEAR RECURRENCES

Prime Divisors of Palindromes

#A22 INTEGERS 17 (2017) NEW CONGRUENCES FOR `-REGULAR OVERPARTITIONS

Sums of Squares. Bianca Homberg and Minna Liu

NOTES Edited by William Adkins. On Goldbach s Conjecture for Integer Polynomials

ON CONGRUENCE PROPERTIES OF CONSECUTIVE VALUES OF P(N, M) Brandt Kronholm Department of Mathematics, University at Albany, Albany, New York, 12222

Transcription:

On the missing values of n! mod p Kevin A. Broughan and A. Ross Barnett University of Waikato, Hamilton, New Zealand Version: 15th Jan 2009 E-mail: kab@waikato.ac.nz, arbus@math.waikato.ac.nz We show that the average proportion of missing values of a sequence of N components with N values, and with no equal neighbors, is 1/e. Key Words: factorial, missing values. MSC2000: 11A41, 11B05, 11B83. 1. INTRODUCTION Many authors have commented on the question of measuring the missing residue classes of the sequence of factorials taken modulo primes, [1, 2, 3, 4, 5]. When looked at as a function of primes p, the number of missing classes, denoted N p, cluster about a line with slope close to 1/e and scatter of the order of p. This clustering is quite striking. See Figure 1 which is a plot of points (p, N p ) for primes p with 2 p 8000. In spite of this clear numerical evidence, analytic evidence is almost entirely absent. That N p p p 1 follows from the relation n = n!((n 1)!) 1 mod p, whereas Banks, Luca, Shparlinski and Stichenoth have shown in [1] that sup p N p =. Neither of these results sheds light on why the line and the slope 1/e should appear. In contrast to this small progress, Cobeli, Vââitu and Zaharescu [2] reveal that the slope 1/e appears quite naturally when the set of all sequences with N values and of length N is considered with N sufficiently large. The proportion of missing values is measured on average to be 1/e. In some sense, the factorial sequence is generic. But this still leaves the fun- 1

2 BROUGHAN AND BARNETT 3000 2500 2000 1500 1000 500 2000 4000 6000 8000 FIG. 1. The number of missing values of n! mod p as a function of p. damental question regarding the missing values of the factorial sequence unanswered. In this paper we take a step closer to the factorial sequence using Cobeli, Vââitu and Zaharescu s method. Here we do not consider all sequences but only those which share a property with n! mod p, namely, if we let the sequence of least positive residues of the factorials be (x 1,..., x p 1 ), so i! x i mod p, then because (i + 1)! i! mod p, it follows that x i+1 x i for all i with 1 i p 2. Sequences with this no-equal-neighbors condition number less than half of all sequences (Lemma 2.1). When we average over this subset we also obtain the slope value 1/e (Theorem 2.1, Corollary). A number of additional constraints could be included, such as x 1 = 1, x 2 = 2, but these make no essential difference to the discussion or to the results. However, constraints in addition to no-equal-neighbors such as no more than n components which are equal should be n apart with n = 2, 3,... provide difficult counting problems and will have to await further work. In what follows we use the notation of [2]. 2. RESULTS Let M and N be given natural numbers. First we derive a formula which implies that, in the case M = N, less than half of the sequences satisfy the no-equal-neighbors condition.

ON MISSING VALUES. 3 Lemma 2.1. Let M and N be natural numbers and let S(M, N) M N be the set of sequences x = (x(n) : 1 n N) with x(n) x(n + 1) for 1 n N 1. (Note that these sequences include the factorials modulo N.) Then the number of elements in S(M, N) is given by S(M, N) = M (M 1) N 1. Proof. By inclusion-exclusion: S(M, N) = M N {x : there exists at least one n with x(n) = x(n + 1)} + {x : there exists at least two n s with x(n) = x(n + 1)} ( ) ( ) N 1 N 1 = M N M N 1 + M N 2 1 2 ( ) N 1 + ( 1) N 1 M 1 = M (M 1) N 1. N 1 It follows from the lemma that if M, N tend to infinity in such a way that N/M λ then S(M, N) M,N M N = 1 e λ. Next we see how to count the number of subsets of S {1,..., n} with the restriction that if i S then i 1 S and i + 1 S. Definition 2.1. For natural numbers n and, let L(n, ) be the number of subsets of {1, 2,..., n} of size 1 such that no two elements, in the natural ordering, are neighbors. Call this the no-neighbors condition. For example L(3, 2) = 1 because {1, 3} is the only admissible subset of {1, 2, 3}. Lemma 2.2. For n, 3 the function L(n, ) satisfies the recurrence L(n, ) = L(n 1, ) + L(n 2, 1).

4 BROUGHAN AND BARNETT It has values which may be written (1) L(n, 1) = n, (2) L(n, 2) = 0 for 1 n 2, ( ) n 1 (3) L(n, 2) = for n 3, 2 and for 3, (4) L(n, ) = 0 for 1 n 2 1, ( ) n + 1 (5) L(n, ) = for n 2. Proof. Items (1) and (2) follow directly. For (3) order the elements of {1, 2,..., n} from the left as usual. If the first element chosen is in position then there are n 1 ways of choosing the second element. Thus the number of subsets is (n 2) + (n 3) + + 1 = (n 1)(n 2). 2 Item (4) follows because any subset of size with 2 > n has at least one set of neighbors. To see (5), divide the subsets up into two disoint families as follows: L(n, ) = {subsets which do not include the leftmost element} + {subsets which do include that element} = L(n 1, ) + L(n 2, 1). Then the expression for L(n, ) follows from the standard binomial recurrence. Note that if u n is the number of non-empty subsets of {1,..., n} satisfying the no-neighbors condition then u 3 = 4, u 4 = 7 and for n > 4, u n = u n 1 + u n 2 + 3 + ( 1)n. 2 This relation is not needed subsequently. A key technical lemma relating the number of subsets satisfying the noneighbors condition and the set of all subsets is the following: Lemma 2.3. If M, N in such a way that N/M λ 1 then M,N N/2 =0 ( N +1 ) ( 1 M ) (1 1 = 1. M )N

ON MISSING VALUES. 5 Proof. First expand the binomial coefficient for the absolute value of a single term in the sum in the numerator: ( N + 1 ) 1 M = ( N M 1 M )( N M M ) ( N M 2 2! M ) Neglecting the negative terms in each factor in the numerator leads to the upper bound (N/M) /!. Summing one negative term from each times the ( 1) th power of the leading term gives (ustified, say, using induction) the lower bound. (N/M)! 1 M 3( 1) ( N 2! M ) 1. Including the alternating signs and adding gives the it M,N =0 N/2 ( N + 1 ) ( 1 M ) = e λ from which the stated result follows. Now we begin to count sequences. First focus on the number of vectors associated with a gap of length g between two specified fixed values y. Definition 2.2. For g 1 let P g (M) be the number of possible choices for vectors in M N satisfying the no-equal-neighbors condition, and having two fixed values y N separated by a gap of length g, where the vectors are free to take any values in {1,..., M}, including the value y, provided the no-equal-neighbors condition continues to be satisfied. Lemma 2.4. For all g 1 let Q g (M) := (M 1) (M 2) g 1. Then (1) P 1 (M) = (M 1), (2) P 2 (M) = (M 1)(M 2) and, (3) for g 3 P g (M) := Q 1 (M)P g 2 (M)+Q 2 (M)P g 3 (M)+ +Q g 2 (M)P 1 (M)+Q g (M).

6 BROUGHAN AND BARNETT Furthermore, for all g 1 P g (M) = (M 1)g+1 + ( 1) g ( 1) g M (M 1)g+1 ( ( 1) g ) = 1 M (M 1) g = ( 1) g+1 (M 1) g =1 ( g ) ( M) 1. Proof. (g = 1) The element in the gap can be chosen in any way except y, i.e. in M 1 ways. (g = 2) If the first element is chosen in M 1 ways then the second can be chosen in any way except this way and y, i.e. in M 2 ways. (g 3) Divide the set of vectors up into disoint subfamilies according to the first internal occurrence of y. If there are no occurrences of y then the number of vectors is Q g (M). Hence P g (M) = {the first internal gap has length 1} + {the first internal gap has length 2} + + {the first internal gap has length g-2} + {there is no internal gap} = Q 1 (M)P g 2 (M) + Q 2 (M)P g 3 (M) + + Q g 2 (M)P 1 (M) +Q g (M). To derive the first form of the closed formula for P g (M), first check explicitly the expressions for g = 1 and for g = 2. Then use induction and the recurrence (3) to verify the formula for all g > 2. Definition 2.3. Let y N be given and let L {1,..., N} be a subset. Then R(M, N, L) is the number of vectors x in M N, satisfying the no-neighbors condition, and x = y for all L. Lemma 2.5. If L is empty then R(M, N, L) = M(M 1) N 1. If L is a singleton, L = {}, then R(M, N, L) = (M 1) N 1. If L = {i, } with i = g 1 1 then R(M, N, L) = (M 1)N 1 ( 1 1 ( M (M 1) )g1).

ON MISSING VALUES. 7 In general, if L has interior gaps g 1,..., g L 1, with n 1 0 of the g i having the value g i = 1, then R(M, N, L) = (M 1)N 1 M L 1 = (M 1) N L ( 1 1 M ( 1 1 ( M 1 )gi) g i ) L n1 1 g i>1 ( 1 ( 1 M 1 )g i ). Proof. The number of vectors associated with each interior gap g i is P gi (M). For each end, count vectors from the position of y outwards. If g l is the length of the left end then there are associated (M 1) g l vectors. If g r is the length of the right end then there are associated (M 1) g r vectors. The total number of vectors is then found by multiplying the contributions together (since the choices are independent). Lemma 2.6. Let L 2 and for 1 i L 1 let positive integers g i be given. Define the polynomial function f(x) = g i (1 ( x) g i ) 1. Then, for 0 < x < 1 2, f(x) x L ( 3 2 ) L. Proof. Since 0 < x < 1, f(x) g i (1 + x) 1 (1 + x) L 1, and f(x) g i (1 x) 1 (1 x) L 1. Hence f(x) max{(1 + x) L 1, 1 ((1 x) L } = (1 + x) L 1. (1) Let g(x) = (1 + x) L 1, so g(0) = 0, and by the Mean Value Theorem, there exists an ξ (0, x) with g(x) = g (ξ)x. But g (ξ) = L (1 + ξ) L 1 so, since 0 < ξ < 1 2, g (ξ) x L ( 3 2 ) L and therefore by (1) f(x) x L ( 3 2 ) L.

8 BROUGHAN AND BARNETT In the proof of Theorem 2.1 we use the notation L {1,..., N}. This means L is a subset of {1,..., N} which satisfies the no-neighbors condition in the sense that if i L then neither i 1 nor i + 1 is in L. Theorem 2.1. Let A v(m, N) be the average taken over sequences satisfying the no-equal-neighbors condition. If M, N in such a way that N/M λ with 0 < λ 1, then M,N A v(m, N) = 1 e λ. Proof. A v(m, N) = = L {1,...,N} L (M 1)N 1 ( 1) M L 1 1 M(M 1) N 1 N ( 1 ( 1 M ) L 1 ( M 1 )gi) g i L {1,...,N} ( 1 1 ( M 1 )gi) N g i = Σ 1 + Σ 2 where Σ 1 = Σ 2 = L {1,...,N} L {1,...,N} ( 1 M ) L and ( 1 M ) L [ ( 1 1 ( M 1 )gi) 1]. g i Now, by Lemma 2.6, as M, Σ 2 = 2 M L {1,...,N} N =0 ( N = 6N (1 + 3 M 2 2 + 3 M ( 1 2 L ) L M M (3 2 ) L ) M (3 2 ) 2M )N,

ON MISSING VALUES. 9 which tends to zero as M, N with N/M λ. Therefore, by Lemma 2.3, we have the main result M,N A v(m, N) = 1 e λ. Corollary 2.1. Let p be an odd prime. Consider the set of sequences of p 1 components with p 1 potential values which satisfy the no-equalneighbors condition. Then the average number of missing values tends to 1/e as p. REFERENCES 1. Banks, W.D., Luca, F., Shparlinski, I.E. and Stichtenoth, H., On the value set of n! modulo a prime, Turkish J. Math. 29 (2005), p169-174. 2. Cobeli, C., Vââitu, M., and Zaharescu, A. The sequence n!(modp), J. Ramanuan Math. Soc. 15 (2000), p135-154. 3. Garaev, M. Z., Luca, F., and Shparlinski, I.E. Exponential sums and congruences with factorials, J. Reine Angew. Math. 584 (2005), p29-44. 4. Garaev, M. Z., Luca, F., and Shparlinski, I.E. Character sums and congruences with n!, Trans. Amer. Math. Soc. 356 (2004), p5089-5102. 5. Guy, R.K., Unsolved problems in number theory, Springer, 1994.