  By a theorem of R. Stanley, a graded Cohen-Macaulay domain $A$ is Gorenstein
if and only if its Hilbert series satisfies the functional equation \[
  \operatorname{Hilb}_A(t^{-1})=(-1)^d t^{-a}\operatorname{Hilb}_A(t), \] where
$d$ is the Krull dimension and $a$ is the a-invariant of $A$. We reformulate
this functional equation in terms of an infinite system of linear constraints
on the Laurent coefficients of $\operatorname{Hilb}_A(t)$ at $t=1$. The main
idea consists of examining the graded algebra $\mathcal F=\bigoplus_{r\in
\mathbb{Z}}\mathcal F_r$ of formal power series in the variable $x$ that
fulfill the condition $\varphi(x/(x-1))=(1-x)^r\varphi(x)$. As a byproduct, we
derive quadratic and cubic relations for the Bernoulli numbers. The cubic
relations have a natural interpretation in terms of coefficients of the Euler
polynomials. For the special case of degree $r=-(a+d)=0$, these results have
been investigated previously by the authors and involved merely even Euler
polynomials. A link to the work of H. W. Gould and L. Carlitz on power sums of
symmetric number triangles is established.
