Is there a finite nonabelian group $G$ of prime exponent such that the full automorphism group of $G$ is of odd order?

2$\begingroup$ I added the Lie algebra tag, because a $p$group of exponent $p$ and nilpotency length $<p$ can be viewed as a Lie algebra by Malcev correspondence. $\endgroup$ – YCor Jan 18 '16 at 11:56

$\begingroup$ Did you do any computer verification (in view of my answer, I'd be interested in a checking for groups of order $3^4$, $3^5$, $3^6$, $5^6$ expecting there are no examples, and would expect an example in order $p^7$ or $p^8$ for some $p$)? $\endgroup$ – YCor Jan 19 '16 at 11:51

$\begingroup$ @YCor. I have done it for all nonabelian groups of exponent $3$ of order at most $3^6$. There is no such example among such groups. $\endgroup$ – Alireza Abdollahi Jan 19 '16 at 12:08

$\begingroup$ @YCor. There is also no such group of order $5^6$. Note that all groups of exponent $3$ and of order at most $3^6$ is of class at most $2$. $\endgroup$ – Alireza Abdollahi Jan 19 '16 at 12:16

1$\begingroup$ Also, 32000 groups of order $5^7$ is tested and there is not such example. Only one group with odd order automorphism exist, but the exponent of this group is $125$. $\endgroup$ – Shahrooz Janbaz Jan 20 '16 at 15:58
Yes:
for every prime $p\ge 7$, there's a finite group of exponent $p$ whose automorphism group is a $p$group.
Initial answer (Jan 18' 2016) Start from any (finitedimensional) complex nilpotent Lie algebra $\mathfrak{g}$ that is defined over $\mathbf{Q}$ and has a unipotent automorphism group (see e.g. Luks' Lie algebra top of p14 in (Ancochea Campoamor survey) for a 16dimensional example), see also first edit (Jan 19' 16) below.
Fix a rational structure, so we can defined $\mathfrak{g}_p$ as the corresponding Lie algebra modulo $p$ for $p$ large enough (i.e., not dividing any of the denominators). (Formally speaking, this means writing $\mathbf{g}=\mathfrak{h}\otimes_{\mathbf{Q}}\mathbf{C}$ for some Lie algebra $\mathfrak{h}$ over $\mathbf{Q}$.)
Then for $p$ large enough, the automorphism group of $\mathfrak{g}_p$ is a $p$group. Indeed otherwise, if for a growing subsequence $(p_i)$ this is not the case, say $\mathfrak{g}_{p_i}$ has an automorphism of prime order $\neq p_i$, passing to the algebraic closure $K_i$ of $\mathbf{F}_{p_i}$ and then to a ultralimit over $i$ we get that the ultraproduct, which is a Lie algebra over the ultraproduct $K$ of the $K_i$ has a nontrivial semisimple automorphism. But this ultraproduct is isomorphic to $\mathfrak{h}\otimes_{\mathbf{Q}}K$. This contradicts that $\mathfrak{g}$ has a unipotent automorphism group.
Note that this provides a group of order $p^{16}$ with some wellcontrolled nilpotency length (I haven't made the computation for Luks' Lie algebra but it's easy to do), but gives no control of $p$, although for small $p$ a computer computation is doable).
We can expect a computer computation to yield explicit examples.
Anyway no example is possible for $p$group of nilpotency length 2 (and odd exponent $p$): indeed such a group admits an action by automorphisms of the multiplicative group modulo $p$ (of order $p1$), because the corresponding Lie algebra is Carnot. Classification along with Malcev correspondence also shows that no group of order $p^{\le 6}$ for prime $p\ge 7$ can work, because the corresponding Lie algebras have nontrivial integral gradings according to the classification by de Graaf in here (J. Algebra 2007) [this also works in order $5^{\le 5}$, and in order $5^6$ except for nilpotency length $=5$].
Edit: (Jan 19' 2016) I have checked that the 7dimensional (with nilpotency length 6) Lie algebra given page 17 line 8 in (Ancochea Campoamor survey), viewed with coefficients in an arbitrary field, has only unipotent automorphisms. If one takes it in the field on $p$ elements for any prime $p\ge 7$, the BakerCampbellHausdorff (which realizes Malcev's correspondence) provides a group of order $p^7$ whose automorphism group is a $p$group (thus of odd order).
According to what's above and computer check by Alireza for $p=3,5$, for $p$ odd any nontrivial $p$group of order $\le p^6$ has an automorphism of order 2. So $p^7$ is the smallest possible order for such exceptions, for $p=3,5$ possibly one has to go a little higher since Alireza checks that every group of order $3^7$ has an automorphism of order 2. (At the moment this gives no example for $p=3,5$ although they certainly exist.)
Edit: (Jan 25' 2018) Thinking a little about the remaining cases $p=3,5$, they seem different and deserve separate additional comments:
first recall by above remark that for any odd $p$, the nilpotency length of any example should be $\ge 3$.
 for $p=5$, Malcev correspondence is valid in nilpotency length $\le 4$. Therefore if one searches among nilpotent rational Lie algebras of nilpotency length in $\{3,4\}$ and unipotent automorphism groups, one can reasonably hope to find one that reduces modulo 5 and for which the reduction modulo 5 has no extra automorphisms.
 $p=3$ is quite different, because exponent 3 implies nilpotency length $\le 3$ (in contrast, by Razmyslov's theorem, for all $p>3$ there are finite groups of exponent $p$ and arbitrary large solvability length). So in this case, Lie algebras are of no help. Finding a finite group of exponent 3 whose automorphism group is a 3group (or of odd order) sounds a quite different question.

$\begingroup$ Is it possible to give an explicit presentation for the group of order $p^7$ in your last EDIT? I have used the same relations as the Lie algebra with the relations of 7th powers of all generators. This gives me a group of nilpotency class 5, expoenent 7 and order $7^6$ whose automorphism group is of order 242121642. Is this because my group is not obtained from BCH? $\endgroup$ – Alireza Abdollahi Jan 20 '16 at 6:27

$\begingroup$ Yes you really have to use BCH. You have a presentation with generators $x_1,\dots,x_7$, relators $x_i^7=1$ and, for $i<j$, $x_ix_jx_i^{1}x_j^{1}=m_{ij}$ for all $i,j$, where $m_{ij}$ is a word in $x_{j+1},\dots,x_7$. With BCH you can compute $m_{ij}$ in the Lie algebra, that is some combination $(\ell(j,j+1),\dots,\ell(j,7))$. This has to be converted into a word of the form $x_{j+1}^{k(j,j+1)}\dots x_7^{k(j,7)}$. Then $k(j,j+1)=\ell(j,j+1)$. To find the next exponents, first compute $x_{j+1}^{k(j,j+1)}m_{ij}$; then $k(j,j+2)$ is the $j+2$coefficient in the resulting element, and so on. $\endgroup$ – YCor Jan 20 '16 at 10:22