Inspired by this problem
The problem is about a quadratic function modulo 53, and it asks for which function values you can compose this function multiple times to get a result of 18.
What's interesting, is that the solutions come in pairs whose sum is always 51, and actually with the ring of integers modulo 53 .
Is this a consequence of mod 53 or always true for quadratic equations?
This is the graph that shows for each value what the function gives and where you would continue and it is really symmetric and I think beautiful (except for a few links that break the patterns)
So this is a proof for this particular polynomial
and for some prime
For a general quadratic polynomial with
For this to be congruent to the original polynomial, we require
The first condition is always true, the other two are equivalent and can be rewritten as
So actually has no influence and we have only one condition on the coefficients (and must be prime).
Let's try to do the same thing with a polynomial of degree 4 (because 3 doesn't work well), so with
By equating coefficients, we get
Again, the first congruence is trivial and the second and third are equivalent. By pluging the second into the fourth and fifth, we find that they are also equivalent. So, we end up with two congruences
If we want we can pick some numbers, maybe to have a normalized polynomial, then has to be . For and , we can pick and and since is without any restriction, let's make it nice and take . This gives the polynomial
and if we try we see that it really follows our rule