Skip to main content
I changed $a$ to $s$ in the last sentence, to be in harmony with earlier notation.
Source Link
GH from MO
  • 105.4k
  • 8
  • 294
  • 398

Total number of elements in $$\bigl|\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})\bigr|=p^{4r}(p^2-1)(p^2-p).$$ Let us count the number of matrices with a given trace $s$. It is $$\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} \bigl|(c,d):p\, \text{does not divide}\, a(s-a)-cd\bigr|.$$ Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. The total number is $$p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)\\=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r).$$ So, for any given remainder $a$$s$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $a$$s$, equals $$\frac{p^{r}(p-1)+p^{r+2}-p+1}{p^{2r+1}(p^2-1)}.$$

Total number of elements in $$\bigl|\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})\bigr|=p^{4r}(p^2-1)(p^2-p).$$ Let us count the number of matrices with a given trace $s$. It is $$\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} \bigl|(c,d):p\, \text{does not divide}\, a(s-a)-cd\bigr|.$$ Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. The total number is $$p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)\\=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r).$$ So, for any given remainder $a$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $a$, equals $$\frac{p^{r}(p-1)+p^{r+2}-p+1}{p^{2r+1}(p^2-1)}.$$

Total number of elements in $$\bigl|\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})\bigr|=p^{4r}(p^2-1)(p^2-p).$$ Let us count the number of matrices with a given trace $s$. It is $$\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} \bigl|(c,d):p\, \text{does not divide}\, a(s-a)-cd\bigr|.$$ Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. The total number is $$p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)\\=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r).$$ So, for any given remainder $s$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $s$, equals $$\frac{p^{r}(p-1)+p^{r+2}-p+1}{p^{2r+1}(p^2-1)}.$$

Improved formatting, simplified final formula
Source Link
Joe Silverman
  • 47.4k
  • 2
  • 149
  • 241

Total number of elements in $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ is $p^{4r}(p^2-1)(p^2-p)$.$$\bigl|\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})\bigr|=p^{4r}(p^2-1)(p^2-p).$$ Let us count the number of matrices with a given trace $s$. It is $\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} |(c,d):p\, \text{does not divide}\, a(s-a)-cd|$.$$\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} \bigl|(c,d):p\, \text{does not divide}\, a(s-a)-cd\bigr|.$$ Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. TotallyThe total number is $p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r)$.$$p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)\\=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r).$$ So, for any given remainder $a$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $a$, equals $(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r)/p^{3r+1}(p^2-1)$.$$\frac{p^{r}(p-1)+p^{r+2}-p+1}{p^{2r+1}(p^2-1)}.$$

Total number of elements in $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ is $p^{4r}(p^2-1)(p^2-p)$. Let us count the number of matrices with a given trace $s$. It is $\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} |(c,d):p\, \text{does not divide}\, a(s-a)-cd|$. Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. Totally $p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r)$. So, for any given remainder $a$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $a$, equals $(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r)/p^{3r+1}(p^2-1)$.

Total number of elements in $$\bigl|\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})\bigr|=p^{4r}(p^2-1)(p^2-p).$$ Let us count the number of matrices with a given trace $s$. It is $$\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} \bigl|(c,d):p\, \text{does not divide}\, a(s-a)-cd\bigr|.$$ Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. The total number is $$p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)\\=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r).$$ So, for any given remainder $a$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $a$, equals $$\frac{p^{r}(p-1)+p^{r+2}-p+1}{p^{2r+1}(p^2-1)}.$$

Source Link
Fedor Petrov
  • 108.9k
  • 9
  • 264
  • 459

Total number of elements in $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ is $p^{4r}(p^2-1)(p^2-p)$. Let us count the number of matrices with a given trace $s$. It is $\sum_{a\in \mathbb{Z}/p^{r+1}\mathbb{Z}} |(c,d):p\, \text{does not divide}\, a(s-a)-cd|$. Clearly it depends only on the remainder of $s$ modulo $p$. For $s$ divisible by $p$, we have $p^{2r}(p-1)^2$ pairs $(c,d)$ for any $a$ divisible by $p$ and $p^{2r+2}-(p^{r+1}-p^r)$ pairs for $a$ not divisible by $p$. Totally $p^{3r}(p-1)^2+(p^{2r+2}-(p^{r+1}-p^r))(p^{r+1}-p^r)=(p^{r+1}-p^r)(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r)$. So, for any given remainder $a$ modulo $p^{r+1}$, which is divisible by $p$, the probability that a random matrix from $\mathrm{GL}_2(\mathbb{Z}/p^{r+1}\mathbb{Z})$ has a trace equal to $a$, equals $(p^{2r}(p-1)+p^{2r+2}-p^{r+1}+p^r)/p^{3r+1}(p^2-1)$.