An $n×n$ matrix $A$ is formed with each element $(a_{ij})$ randomly selected 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.
 A: We can observe that the problem can be expressed in this way: given an $n \times n$ matrix $A$ with entries on $\mathbb{F}_p$ (the finite field of order $p$), what's the probability for the matrix to be of determinant $1$?
Firs of all let's count how many matrices defined in this way have determinant different to $0$. To have a matrix like this have determinant not $0$ the first column can be any vector different from the null vector, so we have $p^n - 1$ choices, the second column can be any vector different from the first column multiplied by a scalar, so we have $p^n - p$ choices...
Proceeding in this way we have that the number we are searching for is $$ r = (p^n - 1)(p^n - p)(p^n - p^2)\cdots (p^n - p^{n - 1})$$
In other words we have found $|GL(n, \mathbb{F}_p)| = r$.
Now, since $GL(n, \mathbb{F}_p)$ is a group under multiplication and $\text{det} : GL(n, \mathbb{F}_p) \longrightarrow \mathbb{F}_p$ is a group homomorphism with kernel the group of matrices with determinant $1$ and range $\mathbb{F}_p^*$, we have that the group of matrices with determinant $1$ is a subgroup of $GL(n, \mathbb{F}_p)$ with index $p - 1$. So this subgruop has $\frac{r}{p -1}$ elements.
From that we have 
$$q_n = \frac{r}{p^{n^2}(p -1)} = \frac{p^{n^2}\left(1 - \frac{1}{p^{n}}\right)\cdots \left(1 -\frac{1}{p}\right)}{p^{n^2}(p - 1)} = \frac{\left(1 - \frac{1}{p^n}\right)\cdots \left(1 - \frac{1}{p}\right)}{p - 1}$$.
Unfortunately I don't find a way to calculate $\lim_{n \to \infty} q_n$, hope someone can help us in comments or in other answers.
A: 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...)
