Cycles in Repeated Exponentiation Modulo $p^n$

Given a number $r$, we consider the dynamical system generated by repeated exponentiations modulo $r$, that is, by the map $u \mapsto f_g(u)$, where $f_g(u) \equiv g^u \pmod r$ and $0 \le f_g(u) \le r-1$. The number of cycles of the defined above dynamical system is considered for $r=p^n$.


Introduction and formulation of results
Given a number r, we consider the dynamical system generated by repeated exponentiations modulo r, that is, by the map u → f q (u), where f q (u) ≡ q u (mod r) and 0 f q (u) r − 1. In [1] the author with Igor Shparlinski considered the case where r is a prime. We gave some estimates on number of 1−, 2−, 3−periodic points of f . We believe that our estimates are very far from being strict (but it seems that the better estimates are not known). Maybe one of the difficulties of the problem is that f is not an algebraic factor of q x : if, for example, gcd(r, φ(r)) = 1 then one can choose representative y ≡ x mod r such that q y has any possible value mod r. The situation where gcd(r, φ(r)) is large may be more easy to deal with. In that case, instead of considering the function f , one may consider the graph with edges from x ∈ Z r to all q y mod r, y ≡ x mod r. I will show that it works very well at list for r = p n with a prime p. In what follows we will suppose that gcd(q, p) = 1.
Let Γ p,n,q be a directed graph defined as follows: the set of vertexes is V (Γ) = Z p n and the set of edges is E = {(x, q y mod p n ) | x ∈ Z p n , y ≡ x mod p n }. Suppose for a moment that q is primitive mod p n . Then p − 1 is the out degree of any edge of the graph Γ. Let C p,n,q (k) be the number of k-cycles (with initial vertex marked) in Γ p,n,q .
Corollary 2. The number of k-periodic points for f (x) ≡ q x mod p n , 0 ≤ f (x) < p n is less than (p − 1) k .
The same technique may be used to estimate the number of k-cyclic points in "additive perturbations" of graph Γ. Precisely, let us define Γ +r p,n,q as follows: the set of vertexes is V (Γ) = Z p n and the set of edges is p,n,q (k) be the number of k-cycles (with the initial vertex marked) in Γ +r p,n,q . Theorem 3. C r+ p,n,q (k) ≤ p + rp[2p(2r + 1)] k (n − 1) So, C grows no more than linearly in n (but the number of all vertexes grows exponentially).
Lemma 5. Let A n be the adjacency matrix of Γ p,n,q . Then , if q is primitive mod p. If q is not primitive then A 1 has the same form with some 1 changed to 0.
ii) Let φ : Z p n → Z p n−1 be defined as φ(x) ≡ x mod p n−1 .
Now it is easy to finish the proof of Theorem 1. First of all C p,n,q (k) = trace((A n ) k ). Using Lemma 4, Lemma 5 and compatibility of the trace and multiplication with the block structure we get Lemma 6. Let A n be the adjacency matrix of Γ +r p,n,q . Then Proof. Item 1 is trivial. The prove of Item 2 proceeds the same way as the one of Theorem 1, but now we have to take into account that y + s( mod p n−1 ) may be different from y + s( mod p n ). Observe, that y + s( mod p n−1 ) = y + s( mod p n ) for r ≥ y ≤ p n−1 − 1 − r. So, for each b ∈ {0, 1, . . . , p − 1} there exists only 2r of y ∈ {0, 1, . . . , p n−1 − 1} where the rows of X are non zero. Now we are ready to prove Theorem 3.
C +r n,p,q (k) = c n = trace(A k n ) ≤ trace(A k n−1 ) + ∆ = c n−1 + ∆ ∆ is the sum of the traces of 2 k−1 matrices P s , each of them is a product of k matrices containing X. Observe, that trace(P s ) ≤ 2rp((2r + 1)p) k . Indeed, this is a number of k-periodic paths such that some steps of the path correspond to the matrix X and some to the matrix B. The estimate follows from the number of non-zero rows of X, and that each row of X and B contains no more than (2r + 1)p ones. Noting that c 1 ≤ p we get c n ≤ p + rp(2(2r + 1)p) k (n − 1).