1. Understanding the Problem:
We need to find the probability q that the determinant of a randomly chosen n×n matrix A with entries from {0,1,…,p−1} is congruent to 1 modulo p as n→∞. Then, we need to compute the sum of the first p2 digits after the decimal point in the base p expansion of q and find the remainder when this sum is divided by 109.
2. Probability Calculation:
Let Si be the set of n×n matrices with determinant imodp. Since the determinant function is multiplicative and the field Z/pZ is finite, the sizes of these sets are equal for i∈{1,2,…,p−1}. The number of non-singular matrices is given by:
P=i=0∏n−1(pn−pi)
The probability qn that detA≡1(modp) is:
qn=p−11⋅pn2P
As n→∞, this probability converges to a limit q.
3. **Base p Expansion of q:**
The base p expansion of q is given by:
q=0.09889001111099988888890000111111110999998888…p
The significant transitions occur at pentagonal numbers. Let f(k)=2k(3k−1) and g(k)=2k(3k+1).
4. Summing the Digits:
For odd k, the digits from f(k)+1 to f(k+1) contribute 2k since:
[f(k)+1,g(k)]:0and[g(k)+1,f(k+1)−1]:1andf(k+1):0
For even k, the digits from f(k) to f(k+1) contribute 6046k+2016 since:
[f(k)+1,g(k)]:9and[g(k)+1,f(k+1)−1]:8andf(k+1):9
5. Calculating the Sum:
Since f(1647)<20172<g(1647), we consider up to k=1646:
- For odd k (1, 3, ..., 1645), we get:
6046(1+3+…+1645)+2016⋅823=6046⋅8232+2016⋅823
- For even k (2, 4, ..., 1646), we get:
2(2+4+…+1646)=4⋅823⋅2823+1
- Since 20172−f(1647) contains only the digit 2016, we get:
[20172−f(1647)]⋅2016
6. Summing All Contributions:
Summing all contributions, we get:
6046⋅8232+2016⋅823+4⋅823⋅412+(20172−f(1647))⋅2016
Simplifying, we find the sum to be 4,098,547,790.