Lie algebra on $m$ generators ${\mathfrak n }_{m,3}$ a Hall basis of a set of generators as before has the form $$\label{ba3}
    \mathcal B=\{e_i, \,[e_j,e_k],\,[[e_r,e_s],e_t]:\,i=1,\ldots,m,\,1\leq k< j\leq m,\, 1\leq s<r\leq m,\,t\geq s\}.$$

It holds ${\mathfrak z }({\mathfrak n }_{m,3})=\mathfrak p(m,3)$, and so $$\dim\, {\mathfrak z }({\mathfrak n }_{m,3})= d_m(3)=m(m^2-1)/3.$$

Free and free metabelian nilpotent Lie algebras and ad-invariant metrics
========================================================================

In this section we determine free nilpotent and free metabelian nilpotent Lie algebras admitting ad-invariant metrics.

Let ${\mathfrak g }$ denote a Lie algebra equipped with an ad-invariant metric $\la\,,\,\ra$, see (\[adme\]). If $\mm \subseteq \ggo$ is a subset, then we denote by $\mm^{\perp}$ the linear subspace of ${\mathfrak g }$ given by $$\mm^{\perp}=\{x\in \ggo, \la x, v\ra=0 \mbox{ for all } v\in \mm\}.$$ In particular $\mm$ is called

-   [*isotropic*]{} if $\mm \subseteq \mm^{\perp}$,

-   [*totally isotropic*]{} if $\mm=\mm^{\perp}$, and

-   [*nondegenerate*]{} if and only if $\mm \cap \mm^{\perp}=\{0\}$.

The proof of the next result follows easily from an inductive procedure.

\[le1\] Let $(\ggo, \la\,,\,\ra)$ denote a Lie algebra equipped with an ad-invariant metric.

-   If $\hh$ is an ideal of $\ggo$ then $\hh^{\perp}$ is also an ideal in $\ggo$.

-   $C^r(\ggo)^{\perp}=C_r(\ggo)$ for all $r$.

Thus on any Lie 