Artinian level algebras of socle degree 4
In this paper we study the O-sequences of the local (or graded) $K$-algebras of socle degree $4.$ More precisely, we prove that an O-sequence $h=(1, 3, h_2, h_3, h_4)$, where $h_4 \geq 2,$ is the $h$-vector of a local level $K$-algebra if and only if $h_3\leq 3 h_4.$ We also prove that $h=(1, 3, h_2, h_3, 1)$ is the $h$-vector of a local Gorenstein $K$-algebra if and only if $h_3 \leq 3$ and $h_2 \leq \binom{h_3+1}{2}+(3-h_3).$ In each of these cases we give an effective method to construct a local level $K$-algebra with a given $h$-vector. Moreover we refine a result by Elias and Rossi by showing that if $h=(1,h_1, h_2, h_3, 1)$ is an unimodal Gorenstein O-sequence, then $h$ forces the corresponding Gorenstein $K$-algebra to be canonically graded if and only if $h_1=h_3 $ and $h_2=\binom{h_1+1}{2}, $ that is the $h$-vector is maximal.