Maths Olympiad Prep

Track / Stage 6 / 335 of 400 #1335 of 1964

Problem 1335

National olympiad, first round
Number theory Difficulty 6.7 Find the answer

Let p=2017p = 2017. Given a positive integer nn, an n×nn\times n matrix AA is formed with each element aija_{ij} randomly selected, with equal probability, from {0,1,,p1}\{0,1,\ldots,p - 1\}. Let qnq_n be probability that detA1(modp)\det A\equiv 1\pmod{p}. Let q=limnqnq=\displaystyle\lim_{n\rightarrow\infty} q_n. If d1,d2,d3,d_1, d_2, d_3, \ldots are the digits after the decimal point in the base pp expansion of qq, then compute the remainder when k=1p2dk\displaystyle\sum_{k = 1}^{p^2} d_k is divided by 10910^9.

Proposed by Ashwin Sah

The source for this one didn't record the answer, so there is nothing to check what you type against. Work it on paper and mark yourself against the solution below.

Official solution

1. Understanding the Problem:
We need to find the probability q q that the determinant of a randomly chosen n×n n \times n matrix A A with entries from {0,1,,p1}\{0, 1, \ldots, p-1\} is congruent to 1 modulo p p as n n \to \infty . Then, we need to compute the sum of the first p2 p^2 digits after the decimal point in the base p p expansion of q q and find the remainder when this sum is divided by 109 10^9 .

2. Probability Calculation:
Let Si S_i be the set of n×n n \times n matrices with determinant imodp i \mod p . Since the determinant function is multiplicative and the field Z/pZ \mathbb{Z}/p\mathbb{Z} is finite, the sizes of these sets are equal for i{1,2,,p1} i \in \{1, 2, \ldots, p-1\} . The number of non-singular matrices is given by:
P=i=0n1(pnpi) P = \prod_{i=0}^{n-1} (p^n - p^i)
The probability qn q_n that detA1(modp)\det A \equiv 1 \pmod{p} is:
qn=1p1Ppn2 q_n = \frac{1}{p-1} \cdot \frac{P}{p^{n^2}}
As n n \to \infty , this probability converges to a limit q q .

3. **Base p p Expansion of q q :**
The base p p expansion of q q is given by:
q=0.09889001111099988888890000111111110999998888p q = 0.09889001111099988888890000111111110999998888\ldots_p
The significant transitions occur at pentagonal numbers. Let f(k)=k(3k1)2 f(k) = \frac{k(3k-1)}{2} and g(k)=k(3k+1)2 g(k) = \frac{k(3k+1)}{2} .

4. Summing the Digits:
For odd k k , the digits from f(k)+1 f(k)+1 to f(k+1) f(k+1) contribute 2k 2k since:
[f(k)+1,g(k)]:0and[g(k)+1,f(k+1)1]:1andf(k+1):0 [f(k)+1, g(k)]: 0 \quad \text{and} \quad [g(k)+1, f(k+1)-1]: 1 \quad \text{and} \quad f(k+1): 0
For even k k , the digits from f(k) f(k) to f(k+1) f(k+1) contribute 6046k+2016 6046k + 2016 since:
[f(k)+1,g(k)]:9and[g(k)+1,f(k+1)1]:8andf(k+1):9 [f(k)+1, g(k)]: 9 \quad \text{and} \quad [g(k)+1, f(k+1)-1]: 8 \quad \text{and} \quad f(k+1): 9

5. Calculating the Sum:
Since f(1647)<20172<g(1647) f(1647) < 2017^2 < g(1647) , we consider up to k=1646 k = 1646 :
- For odd k k (1, 3, ..., 1645), we get:
6046(1+3++1645)+2016823=60468232+2016823 6046 \left(1 + 3 + \ldots + 1645\right) + 2016 \cdot 823 = 6046 \cdot 823^2 + 2016 \cdot 823
- For even k k (2, 4, ..., 1646), we get:
2(2+4++1646)=4823823+12 2 \left(2 + 4 + \ldots + 1646\right) = 4 \cdot 823 \cdot \frac{823 + 1}{2}
- Since 20172f(1647) 2017^2 - f(1647) contains only the digit 2016, we get:
[20172f(1647)]2016 [2017^2 - f(1647)] \cdot 2016

6. Summing All Contributions:
Summing all contributions, we get:
60468232+2016823+4823412+(20172f(1647))2016 6046 \cdot 823^2 + 2016 \cdot 823 + 4 \cdot 823 \cdot 412 + (2017^2 - f(1647)) \cdot 2016
Simplifying, we find the sum to be 4,098,547,790 4,098,547,790 .

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.