If $W \subseteq X^*$ is some language denote by $$T(W) := \{ u \in X^* : \mbox{there exists }x, y \mbox{ such that } xuy \in W \}$$ the set of factors (infixes) of $W$.
If $W$ is regular, then there is a $k \in \mathbb N$ such that $$ |T(W) \cap X^n| \le \frac{k}{2} \cdot \sum_{i=0}^k | W \cap X^{n+i} | $$
I saw this in a paper, where it is written this is seen by choosing as $k$ twice the number of an automaton accepting $W$. But for me this is not so obvious, I do not see that it holds?
Remark: Everything I see is that if we set $k$ twice the number and if $w \in T(W) \cap X^n$ then there exists $x,y$ such that $xwy \in W$, then either $|xwy| \le n + k$ or otherwise either $x$, or $y$ or both are longer then $\frac{k}{2}$. By using an argument similar to the automata based proof of the pumping lemma we can choose $\hat x, \hat y$ such that $|\hat x| \le \frac{k}{2}, |\hat y| \le \frac{k}{2}$ and $\hat x w \hat y \in W$, i.e. $\hat x w \hat y \in \bigcup_{i=0}^k W \cap X^{n+i}$. But this is to weak to derive the inequality (as many $w \in T(W)\cap X^n$ could correspond to the same word in $\bigcup_{i=0}^k W\cap X^{n+i}$) ...