TITLE: An $n×n$ matrix $A$ is formed with each element $(a_{ij})$ randomly selected
QUESTION [5 upvotes]: Let $p$ be a prime number.Given a positive integer $n$, an $n×n$ matrix $A$ is formed with each element $(a_{ij})$ randomly selected, with equal probability, from $[0, 1, ..., p − 1]$. Let $q_n$ be probability that $\text{det}A \equiv 1 (\ mod \ p)$.Find $\lim_{n \rightarrow \infty} q_n$ 
I have the idea of looking each entry of the matrix in terms of modulo $p$.
I was working with small cases for $p$ like $5$.
But it left me clueless.

REPLY [2 votes]: The analysis in Stefano's  answer shows that $$\lim_n q_n=\frac1{p-1}\prod_{k=1}^\infty\left(1-\frac1{p^k}\right).$$
Since $\sum1/p^n<\infty$ this does tell us that $$0<\lim q_n<1,$$which seems like the most interesting aspect of the question.
I'm skeptical about the existence of a simple closed form for the limit. Because: We can define a function holomorphic in the unit disk by $$f(z)=\prod(1-z^n).$$Now $f$ has the unit circle for a "natural boundary" (because any extension to a connected open set strictly larger than the unit disk would have a zero of infinite order at a root of unity), and the idea of a nice formula behaving so badly near every boundary point seems implausible. (A nice closed form for $f(1/p)$ also seems unlikely, if there is no closed form for $f(z)$ in general...)