Is a finite group $G$ determined by the sequence $p(G,k)$ of probabilities that $G$ is generated by $k$ random elements? Given a finite group $G$ and positive integer $k$, let $N(G,k)$ be the number of $k$-element subsets of $G$ that generate $G$, and let $p(G,k) = N(G,k) / \binom{|G|}{k}$ be the probability that $G$ is generated by $k$ random distinct elements. When $|G|$ < k, let us adopt the convention that $p(G,k) = 1$.
This probability, or a slightly modified version of it that doesn't require the $k$ elements to be distinct, has been studied before and there are results about specific groups and what happens as $|G|$ tends to $\infty$. I'm particularly interested in the following questions but I haven't been able to find any references about them:


*

*Is the isomorphism class of $G$ determined by the sequence $p(G,k)$ where $k$ runs over the positive integers?

*For a fixed $k>0$, what is the distribution of the set $B_k = \{p(G,k) ~|~ G \text{ a finite group}\}$ in $\mathbb{Q} \cap [0,1]$? Is it dense in $[0,1]$? Is it all of $\mathbb{Q} \cap [0,1]$?


I'm primarily interested in the first question, but it seems like most of the literature on this has focused on questions more similar to the second.
For the second question, if we take the simple case $k=1$, we see that $B_1 = \{\phi(n)/n ~|~ n \in \mathbb{Z}_+\}$ since $p(G,1)$ is $0$ if $G$ is not cyclic and $\phi(n)/n$ if $G$ is cyclic of order $n$. It's easy to see that this is not all of $\mathbb{Q} \cap [0,1]$ but (if my analysis isn't failing me) it should be dense in $[0,1]$.
For $k=2$, I believe it is known that as $|G|$ increases, $p(G,2)$ tends to $1$. But there are groups of large order that still have $p(G,2)$ smaller than, say, $1/2$, so I don't think we can immediately rule out the potential density of $B_2$ with just this.
In general, I don't think the answer to the second question should be impacted if we change the definition of $p(G,k)$ to allow for repeated elements, since this should only change $p(G,k)$ very slightly when $|G| >> k$. The other definition might be easier to work with, but I didn't like the "noise" that was introduced by allowing us to, say, pick the identity element $k$ times.
 A: For a counterexample to question 1, compare the dihedral group $D_4$ (of order 8) with $\mathbb Z_4\times\mathbb Z_2$. Both groups are generated by two elements $a,b$, with the common relations $a^4=b^2=1$, and the additional relation $bab=a^{\pm 1}$, with exponent $+1$ for the abelian group and $-1$ in the case of $D_4$.
The elements are $a^n$ and $a^nb$, with $n=0,1,2,3$.
We can now check that in fact the generating sets themselves are the same (in terms of $a,b$).
Everything follows from the observation that for both groups, the order 4 subgroups are the same (in terms of $a,b$), namely: $\{1,a,a^2,a^3\}$, $\{1,a^2,b,a^2b\}$, $\{1,a^2, ab,a^3b\}$
(a) $k= 4$: Four elements don't generate $G$ if and only if they form an order $4$ subgroup.
(b) $k=3$: If the identity is not one of the three elements and we want a triple that doesn't generate $G$, then we must take the three elements $\not= 1$ from an order $4$ subgroup. If one of the three elements is $1$, then we're really in case (c) below.
(c) $k=2$: To obtain a pair $\{x,y\}$ that doesn't generate $G$, we can either take one of the elements $=1$, or if $x,y\not=1$, then $\langle x,y \rangle$ is an order $4$ subgroup, so then exactly the selections of two elements from one of these work.
So for both groups, $p(1)=0$, $p(2)=3/7$, $p(3)=11/14$, $p(4)=67/70$.
