int32 first number of the serie
int32 a coefficient in the formula
bool32.rising trigger
bool32.rising reset
int32 output
int ntrig;
int rtrig;
int i;
ntrig = 0;
rtrig = 0;
i = 1;
if ((inlet_trig > 0) && !ntrig) {
i = (i * (i + inlet_a + 1));
ntrig = 1;
} else if (!(inlet_trig > 0))
ntrig = 0;
if ((inlet_r > 0) && !rtrig) {
if (inlet_i0)
i = inlet_i0;
else
i = 1;
rtrig = 1;
} else if (!(inlet_r > 0))
rtrig = 0;
outlet_o = i;