Let $G$ be a finite $p$group. Since we can embed $Z_2(G)/Z(G)$ in $Hom(G,Z(G))$, we have $d_2 \leq d(G)d(Z(G))$; where $d_2(G)=d(Z_2(G)/Z(G))$ and $d(G)$ denotes the minimal number of generators of $G$. The question is, does the equality $d_2 = d(G)d(Z(G))$ imply that $Z(G)$ is cyclic?

$\begingroup$ I think that the answer is affirmative. If you have not an answer, can you suggest a way to tackle this question? $\endgroup$ – Yassine Guerboussa Mar 2 '13 at 18:11

$\begingroup$ But why do you think the answer is yes? $\endgroup$ – Derek Holt Mar 2 '13 at 22:00

$\begingroup$ For a cyclic group, isn't $d_2(G)$ zero? $\endgroup$ – Will Sawin Mar 2 '13 at 23:23

$\begingroup$ Ok, Prof. Derek Holt; The order of G is greater than the products of the p^{d_i], where d_i is the number of generators of the ith term of the upper central series. Still n is greater than the sum of d_1 and d_2 and the others replaced by 1 ( the last replaced by 2, since the last factor can not be cyclic). Now under our condition, it follows easily that $d_1(d(G)+1) \leq nc+1$( this inequality is due th A. Abdollahi). Now if G is a counter example, then the coclass of G is at least 5. Also, the class of G is greater than 2(otherwise $d_2 \leq d(G)$). therefore the order of G is at least p^8 $\endgroup$ – Yassine Guerboussa Mar 3 '13 at 7:32

$\begingroup$ It is not hard to see that our counter example can not be powerful nor pcentral. and with some work it can not be a direct product of two pgroups. $\endgroup$ – Yassine Guerboussa Mar 3 '13 at 7:35
OK, here is an example of a group $Q$ of class 3 and order $p^{17}$, which will work for $p \ge 5$. We have $d(Q)=5$, $d(Z(Q)) = 2$, $d(Z_2(Q))/Z(Q)) = 10$, with $Z(Q) = \langle Q.16, Q.17 \rangle$ and $Z_2(Q) = \langle Q.6,\ldots,Q.17 \rangle$. All generators have order $p$  in fact $Q$ has exponent $p$. All pairs of generators commute except for those in the list below. (This is Magma output.)
Q.2^Q.1 = Q.2 * Q.6,
Q.3^Q.1 = Q.3 * Q.7,
Q.3^Q.2 = Q.3 * Q.8,
Q.4^Q.1 = Q.4 * Q.9,
Q.4^Q.2 = Q.4 * Q.10,
Q.4^Q.3 = Q.4 * Q.11,
Q.5^Q.1 = Q.5 * Q.12,
Q.5^Q.2 = Q.5 * Q.13,
Q.5^Q.3 = Q.5 * Q.14,
Q.5^Q.4 = Q.5 * Q.15,
Q.6^Q.1 = Q.6 * Q.16,
Q.7^Q.1 = Q.7 * Q.17,
Q.8^Q.2 = Q.8 * Q.16,
Q.9^Q.2 = Q.9 * Q.17,
Q.10^Q.1 = Q.10 * Q.17,
Q.10^Q.3 = Q.10 * Q.16,
Q.11^Q.2 = Q.11 * Q.16,
Q.11^Q.3 = Q.11 * Q.17,
Q.12^Q.4 = Q.12 * Q.16,
Q.13^Q.4 = Q.13 * Q.17,
Q.14^Q.5 = Q.14 * Q.16,
Q.15^Q.1 = Q.15 * Q.16,
Q.15^Q.2 = Q.15 * Q.17,
Q.15^Q.5 = Q.15 * Q.17.
The conditions that you listed on such an example just mean that examples are moderately large, and so are more difficult to construct. They do not provide any genuine evidence that there are no such examples. There was a conjecture about $p$groups called the classbreadth conjecture that was open for a long time, but as soon as it became possible to use computers to study larger groups, it became relatively easy to find counterexamples.

$\begingroup$ @Derek: Is it possible to have a 2group of class at least 4 satisfying the required condition? Do you expect that such a 2group exists? Only I would like to know your opinion? Thanks in advance. $\endgroup$ – Alireza Abdollahi Mar 3 '13 at 15:43

$\begingroup$ Wow, I have thinked about this problem for more than a year. I am really grateful Prof. Derek. unfortunately, I know almost any thing about Magma ( also Gap), I try to check your example without computer. $\endgroup$ – Yassine Guerboussa Mar 3 '13 at 17:38

$\begingroup$ Dear Prof. Abdollahi, Now I think that there is a great possibility to find a counter example to the noninner conjecture. And why not among those in small libraries of groups. I don't think that are all checked. $\endgroup$ – Yassine Guerboussa Mar 3 '13 at 17:43

$\begingroup$ @Yassine: Derek's groups are of exponent $p$ and so they do not provide any counterexample to the noninner conjecture: Every nonabelian finite $p$group has a noninner automorphism of order $p$. Every possible counterexample to this conjecture satisfies the property mentioned by Yassine. $\endgroup$ – Alireza Abdollahi Mar 3 '13 at 19:43

$\begingroup$ @Yassine: Another point is that as you mentioned above a possible counterexample must have order at least $p^8$, in this case GAP cannot help as the small group library is limited to groups of order at most $p^6$. But for the case of 2groups of orders 512 or 1024 I do not know as some experts have access to the classification of these groups. $\endgroup$ – Alireza Abdollahi Mar 3 '13 at 19:47