Is there any specific way to solve recurrence of form (example):
$$f(x) = (a \cdot f(x-1) + c) \bmod{r} $$ (when recurrence involves modulo).
For recurrence without modular arithmetic I could use generating function method (multiply by $x^n$, sum, manipulate terms and so on) and often solve it in simple way. Could I somehow exploit information about recurrence solution without modulo to solve recurrence with modulo?