All rings will be commutative.
Let $k \geq 0$ be an integer.
We define $B_k(X) \in \mathbb{Q}[X]$ as follows.
$B_0(X) = 1$, $B_1(X) = X$.
If $k > 1$, $B_k(X) = X(X - 1)\cdots (X - k + 1)/k!$.
$B_k(n)$ is an integer for every integer $n$.
Let $f \in \mathbb{Q}[X]$.
We define $\Delta f \in \mathbb{Q}[X]$ by $\Delta f(X) = f(X + 1) - f(X)$.
Let $f:\mathbb{Z} \rightarrow \mathbb{Z}$ be a map.
We define a map $\Delta f:\mathbb{Z} \rightarrow \mathbb{Z}$ by $\Delta f(n) = f(n+1) - f(n)$.
Lemma 1
Let $f \in \mathbb{Q}[X]$.
The following conditions are equivalent.
(1) $f = \Sigma_k a_k B_k(X)$ for some $a_k \in \mathbb{Z}$.
(2) $f(n) \in \mathbb{Z}$ for all $n \in \mathbb{Z}$.
(3) There exists $n_0 \in \mathbb{Z}$ such that $f(n) \in \mathbb{Z}$ for all $n \geq n_0$, $n \in \mathbb{Z}$.
(4) $\Delta f$ satisfies (1) and there exists $n_0 \in \mathbb{Z}$ such that $f(n_0) \in \mathbb{Z}$.
Proof:Left to the readers.
Let $n_0 \in \mathbb{Z}$.
Let $\mathbb{Z}_{n\geq n_0}$ be the set {$n \in \mathbb{Z}; n \geq n_0$}.
Let $f:\mathbb{Z}_{n\geq n_0} \rightarrow \mathbb{Z}$ be a map.
If there exists $g(X) \in \mathbb{Q}[X]$ and a integer $m_0$ such that $f(n) = g(n)$ for all $n \geq m_0$, we say $f$ is polynomial-like.
$g(X) \in \mathbb{Q}[X]$ is uniquely determined by $f$.
The degree of $g(X)$ is called the degree of $f$.
If $f$ is a map $f:\mathbb{Z} \rightarrow \mathbb{Z}$, polynomial-like $f$ is defined similarly.
Lemma 2
The following conditions are equivalent.
(1) $f$ is polynomial-like.
(2) $\Delta f$ is polynomial-like.
(3) There exists $r \geq 0$ and an integer $n_0$ such that $\Delta^r f(n) = 0$ for all $n \geq n_0$.
Proof:Left to the readers.
Let $S$ be a graded ring ($S_d=0$ for $d<0$).
We assume that $S_0$ is an Artinian ring and $S$ is generated over $S_0$ by finite elements $x_1,\dots, x_r$ of $S_1$.
$S$ is isomorphic to $S_0[X_1,\dots, X_r]/I$, where $S_0[X_1,\dots, X_r]$ is a polynomial ring and $I$ is a homogeneous ideal.
Hence $S$ is Noetherian.
Let $M$ be a finitely generated graded $S$-module.
Each $M_n$ is a finitely generated $S_0$-module.
Hence $M_n$ is Artinian $S_0$-module.
We denote the length of $M_n$ over $S_0$ by $\chi(M, n)$.
Theorem
$\chi(M, n)$ is polynomial-like and its degree $\leq r - 1$.
Proof:
We can assume that $S = S_0[X_1,\dots, X_r]$.
We use induction on $r$.
If $r = 0$, $M$ is finitely generated over $S_0$.
Since $M$ is of finite length, $\chi(M, n) = 0$ for large $n$.
Suppose $r > 0$.
Let $\lambda:M \rightarrow M$ be the endomorphism induced by the multiplication by $X_r$.
Let $K$ = Ker($\lambda$), $L$ = Coker($\lambda$).
$K$ and $L$ are graded modules over $S$.
We get the following exact sequence.
$0 \rightarrow K_n \rightarrow M_n \rightarrow M_{n+1} \rightarrow L_{n+1} \rightarrow 0$.
Hence $\Delta \chi(M, n) = \chi(M, n+1) - \chi(M, n) = \chi(L, n+1) - \chi(K, n)$.
Since $K_n$ is annihilated by $X_n$, $K$ can be regarded as a graded module over $S_0[X_1,\dots,x_{r-1}]$. By the induction assumption, $\chi(K, n)$ is polynomial-like of degree $\leq r-2$.
Similarly $\chi(L, n+1)$ is polynomial-like of degree $\leq r-2$.
Hence, by Lemma 2, $\chi(M, n)$ is polynomial-like of degree $\leq r-1$.
QED
Let $A$ be a ring.
Let $I$ be an ideal of $A$.
Let gr($A$) = $\bigoplus_{n \geq 0} I^n/I^{n+1}$.
gr($A$) is a graded ring.
Let $M$ be an $A$-module.
Let $(M_n)$, $n \geq 0$ be a sequence of submodules of $M$ such that $M = M_0$ and
$M_n \supset M_{n+1}$ for all $n \geq 0$.
We say $(M_n)$ is an $I$-filtration if $IM_n \subset M_{n+1}$.
We say $(M_n)$ is a stable $I$-filtration if $IM_n = M_{n+1}$ for all large $n$.
If $(M_n)$ is an $I$-filtration, let gr($M$) = $\bigoplus_{n \geq 0} M_n/M_{n+1}$.
gr($M$) is a graded gr($A$)-module.
Lemma 3
Let $A$ be a Noetherian ring.
Let $I$ be an ideal of $A$.
Let $M$ be a finitely generated A-module.
Let $I$ be an ideal of $A$.
Let $(M_n)$ be a stable $I$-filtration.
Then gr($M$) is a finitely generated gr($A$)-module.
Proof:
There exists $n_0$ such that $M_{n+n_0} = I^nM_{n_0}$ for all $n \geq 0$.
Hence gr($M$) is generated by $\bigoplus_{n \leq n_0} M_n/M_{n+1}$.
Hence gr($M$) is a finitely generated gr($A$)-module.
QED
Proposition
Let $A$ be a Noetherian local ring with the maximal ideal $\mathfrak{m}$.
Let $\mathfrak{q}$ be a $\mathfrak{m}$-primary ideal of $A$.
Let $x_1,\dots,x_r$ be generators of $\mathfrak{q}$.
Let $M$ be a finitely generated $A$-module.
Let $(M_n)$ be a stable $\mathfrak{q}$-filtration.
Then the following assertions hold.
(1) $M/M_n$ is of finite length for all $n \geq 0$.
(2) leng($M/M_n$) is polynomial-like of degree $\leq r$.
(3) The degree and leading coefficient of leng($M/M_n$) are the same as leng($M/\mathfrak{q}^nM$).
Proof:
(1) and (2):
Let gr($A$) = $\bigoplus \mathfrak{q}^n/\mathfrak{q}^{n+1}$.
Let gr($M$) = $\bigoplus M_n/M_{n+1}$.
gr($M$) is a graded gr($A$)-module.
Let $\tilde x_i$ be the image of $x_i$ in $\mathfrak{q}/\mathfrak{q}^2$.
Then gr($A$) = $(A/\mathfrak{q})[\tilde x_1,\dots,\tilde x_r]$.
By Lemma 3, gr($M$) is a finitely generated gr($A$)-module.
Hence by Theorem, $\chi(M, n)$ is polynomial-like and its degree $\leq r - 1$.
Let $l_n $= leng($M/M_n$) = leng($M_0/M_1$) $+\cdots +$ leng($M_{n-1}/M_n$).
Since $l_{n+1} - l_n = \chi(M, n)$,
$l_n$ is polynomial-like of degree $\leq r$.
(3):
There exists $n_0$ such that $\mathfrak{q}M_n = M_{n+1}$ for $n \geq n_0$.
$\mathfrak{q}^{n+n_0}M \subset M_{n+n_0} = \mathfrak{q}^nM_{n_0} \subset \mathfrak{q}^nM \subset M_n$.
Hence leng($M/\mathfrak{q}^{n+n_0}M$) $\geq$ leng($M/M_{n+n_0}$) $\geq$ leng($M/\mathfrak{q}^nM$) $\geq$ leng($M/M_n$).
Hence the assertion follows.
QED