If the output of f(x)f(x) is a natural number, then we can write the value f(x)f(x) as:

f(x)=∑i=1∞[f(x)≥i] f(x) = \sum_{i=1}^\infty [f(x) \geq i]

where [f(x)≥i][f(x) \geq i] is 11 if the condition is true and 00 otherwise.

Another useful indicator type equation is:

∑xf(x)=∑x∑ii⋅[f(x)=i]=∑ii⋅(∑x[f(x)=i]) \sum_x f(x) = \sum_x \sum_i i \cdot [f(x) = i] = \sum_i i \cdot (\sum_x [f(x) = i])