I did not find a sequence in OEIS about the number of groups of a given order with a center of size $2$.
For the first few powers of $2$, the numbers are :
$2$ : $1$ group
$4$ : $0$ groups
$8$ : $2$ groups
$16$ : $3$ groups
$32$ : $10$ groups
$64$ : $27$ groups
$128$ : $121$ groups
$256$ : $605$ groups
I wanted to count the number of groups of order $512$ with a size of center $2$ with GAP, but it takes very long.
The first million of the groups contains $4842$ examples, the next million of groups all have center-size $16$ and the groups from $10,400,000$ to the last group contains $29$ such groups
Questions : Does anyone know the number of groups of order $n$ with a center of size$2$ for $n=512$ and $1024$ ?
Can the probability that a random group of order $n$ has a center of size $2$ be estimated for higher values ($2048$ or even $4096$) ?
I have the data for groups of order $512$ which I calculated using ParGAP package on an 8-core machine for the 2009 paper "The modular isomorphism problem for the groups of order $512$" with Bettina Eick.
For groups of order $512$, I have:
so the number of groups with the centre of order $2$ is $5327$.
My data agree with your observations:
Groups of order 1024 are not included in the GAP Small Groups Library, so this is going to be harder. I don't know if anyone knows.
For even larger groups, to start with, is there a clean definition what does "the random group of order $n$" mean?