key: cord-0509434-0tw0lmif authors: Lorenzini, Dino; Melistas, Mentzelos; Suresh, Arvind; Suwama, Makoto; Wang, Haiyang title: Integer Dynamics date: 2021-05-29 journal: nan DOI: nan sha: e6a29cfa1c7f724e0b951df381e38800f961c0de doc_id: 509434 cord_uid: 0tw0lmif Let $b geq 2$ be an integer, and write the base $b$ expansion of any non-negative integer $n$ as $n=x_0+x_1b+dots+ x_{d}b^{d}$, with $x_d>0$ and $ 0 leq x_i0$ for all $n>0$. Consider the map $S_{phi,b}: {mathbb Z}_{geq 0} to {mathbb Z}_{geq 0}$, with $ S_{phi,b}(n) := phi(x_0)+ dots + phi(x_d)$. It is known that the orbit set ${n,S_{phi,b}(n), S_{phi,b}(S_{phi,b}(n)), dots }$ is finite for all $n>0$. Each orbit contains a finite cycle, and for a given $b$, the union of such cycles over all orbit sets is finite. Fix now an integer $ellgeq 1$ and let $phi(x)=x^2$. We show that the set of bases $bgeq 2$ which have at least one cycle of length $ell$ always contains an arithmetic progression and thus has positive lower density. We also show that a 1978 conjecture of Hasse and Prichett on the set of bases with exactly two cycles needs to be modified, raising the possibility that this set might not be finite. Fix an integer b ≥ 2. Any non-negative integer n can be written uniquely in base b as n = x 0 + x 1 b + · · · + x d b d with x d > 0 and 0 ≤ x i < b for i = 0, . . . , d. We let n = [x 0 , . . . , x d ] b denote the base b expansion of n. Fix now a function φ : {0, 1, . . . , b − 1} → Z ≥0 , and consider the map S φ,b : Z ≥0 → Z ≥0 , with S φ,b (n) := φ(x 0 ) + · · · + φ(x d ). For instance, when b = 10 and φ(x) = x 2 , then S φ,b (345) = 3 2 + 4 2 + 5 2 . The ordered sequence [n, S φ,b (n), S φ,b (S φ,b (n)), . . . ] is called the orbit of n under S φ,b . We say that n has finite orbit under S φ,b if the set {n, S φ,b (n), S φ,b (S φ,b (n)), . . . } is finite. Any finite orbit contains a finite cycle, a non-empty sequence of integers cyc(n 1 , . . . , n ℓ ) such that S φ,b (n ℓ ) = n 1 and when ℓ > 1, S φ,b (n i ) = n i+1 for i = 1, . . . , ℓ − 1. This cycle of length ℓ is unique up to cyclic permutation of its terms. the cycles associated with S φ,b . The complete determination of the cycles of a given S φ,b is computationally quite expensive for large b's. When φ(x) = x m , one can proceed as follows. Theorem 1.2. Let φ(x) = x m . For each integer n ≤ (m − 1)b m − 1, compute the cycle of S φ,b (n). Then the union of all these cycles is the complete set of cycles associated with S φ,b . This statement follows from [11, Theorem 7] , and the key to Stewart's proof is that if n > (m − 1)b m − 1, then n > S φ,b (n). Hence, every cycle for S φ,b contains a positive integer at most equal to (m − 1)b m − 1. In particular, every cycle for S φ,b contains a positive integer whose base b expansion has at most m + 1 digits. When φ(x) = x 2 , the number of 1-cycles of a given S x 2 ,b is explicitly determined by the following theorem of P. Subramanian [12, Theorem 1.2] (see also [7, Section 3] , and Proposition 4.1). Recall that a divisor d of a positive integer n is called proper if 1 ≤ d < n. For convenience, let us call [1] the trivial cycle of S x m ,b . Let ℓ ≥ 1 be any integer. Let B(ℓ) denote the set of bases b such that S x 2 ,b has at least one non-trivial cycle of length ℓ. The key ingredient in the proof of Theorem 2.8 is the existence of special ℓ-cycles that we now define. Let c = cyc(n 1 , . . . , n ℓ ) denote a cycle of length ℓ for S x 2 ,b . We say that c is a propagating cycle if (i) every integer n i , i = 1, . . . , ℓ, has at most two digits when written in base b and (ii) b does not divide n i , for all i = 1 . . . , ℓ. The name 'propagating' is justified by our next theorem. It is easy to check with Theorem 1.2 that all 1-cycles of S x 2 ,b are propagating. Theorem (see 2.7). Let b 0 ≥ 2. Assume that S x 2 ,b 0 has s distinct propagating cycles, of lengths ℓ 1 , . . . , ℓ s , respectively (repetitions are allowed). Let t ≥ 0 be any integer, and let b := b 0 + t(b 2 0 + 1). Then S x 2 ,b has (at least) s distinct propagating cycles, of lengths ℓ 1 , . . . , ℓ s respectively. Propagating ℓ-cycles can naturally be seen as corresponding to integer points on an algebraic variety V ℓ /Q. It turns out that V ℓ has the property that, through every integer point on it corresponding to an ℓ-cycle, there passes at least one integer line given by explicit equations. This arithmetico-geometrical fact underlies the proof of Theorem 2.7. When ℓ = 1 or 2, there is in addition a second integer line passing through each point, which also propagates cycles. We exploit the existence of this second line when ℓ = 2 in Proposition 3.4 and Remark 3.6. Some of Stewart's 1960 results [11] have been independently rediscovered by H. Hasse and G. Prichett in 1978 ([7, Theorem 4.1] ). At the end of [7] , Hasse and Prichett propose the following conjecture: Let φ(x) = x 2 and consider the set L(x 2 , 2) of all integers b ≥ 2 such that the list of cycles associated with S φ,b consists of the trivial cycle [1] and exactly one additional cycle. Then L(x 2 , 2) = {6, 10, 16, 20, 26, 40}. Hasse and Prichett made this conjecture after having numerically verified it for b ≤ 500. Let φ(x) be any polynomial taking positive values on Z >0 . Let L(φ, i) denote the set of integers b ≥ 2 such that the list of cycles associated with S φ,b consists of exactly i distinct cycles. It is natural to wonder whether the Hasse-Prichett conjecture for φ(x) = x 2 and i = 2 is in fact only a specific instance of a much more general phenomenon, namely, that all the sets L(φ, i) are finite, for all i ≥ 1. Curiously, Hasse and Prichett do not mention in [7] a similar conjecture for the set L(x 2 , 1). In this case, that L(x 2 , 1) = {2, 4} seems to be by now a folklore conjecture. It is stated in [10] , A161872, that the conjecture has been verified for all b < 500, 000, 000. Subramanian's Theorem 1.3 shows that if the set L(x 2 , 2) is infinite, it will indeed be very sparse, since if b ∈ L(x 2 , 1) or L(x 2 , 2), then b 2 + 1 is prime. To justify this claim, note that Theorem 1.3 implies that b 2 + 1 can only have at most one proper divisor bigger than 1. This can happen only when b 2 + 1 = p 2 for some prime p. But the factorization 1 = (p − b)(p + b) has no integer solutions when b ≥ 2. The unboundedness of the set of integers b such that b 2 + 1 is prime is implied by a general 1857 conjecture of Victor Bouniakowsky [2, page 328] , that any irreducible polynomial f (x) ∈ Z[x] with positive leading coefficient takes infinitely many prime values if the values f (1), f (2), f (3), . . . have no common factor. This conjecture in the case of f (x) = x 2 +1 was one of E. Landau's four problems presented at the 1912 International Congress of Mathematicians (see [6] , pp 46-48). Note that a negative answer to the Hasse-Prichett Conjecture (in the strong sense where L(x 2 , 2) would be proved to be infinite) would provide a positive answer to Landau's problem. The computations below were done using the cluster Sapelo2 at the Georgia Advanced Computing Resource Center. 10, 16, 20, 26, 40, 8626, 481360}. Thus the Hasse-Prichett Conjecture at the very least needs to be modified to include the bases b = 8626 and b = 481360. The existence of the large gap between these two bases might be seen as evidence against the validity of the modified conjecture. Searching for other types of finiteness, one may wonder for instance whether, for a given integer d, the set M(x 2 , d) of all bases b such that S x 2 ,b only has cycles of length at most d is finite. We have {2, 4} ⊆ M(x 2 , 1) and {2, 3, 4, 13, 18, 92} ⊆ M(x 2 , 2). Moreover, 452808 ∈ M(x 2 , 12). The presence of the large gap in M(x 2 , 10) might be seen as evidence that M(x 2 , 10) might be infinite. For comparison with the case φ(x) = x 2 , let us note the following results for φ(x) = x 3 . Theorem (see 5.1 and 5.4). Let b > 2 be a square, or an integer that is not divisible by 9. Then S x 3 ,b has at least one non-trivial 1-cycle. In particular, the set of bases b ≥ 2 such that S x 3 ,b has a non-trivial 1-cycle has lower density bounded below by 8/9. Theorem (see 5.7 and 6.3). Let k ≥ 1 be any integer. (a) Let b = 3k + 1. Then S x 3 ,b has at least five distinct cycles. (b) Let b = 9k 2 + 15k + 7 or 9k 2 + 21k + 13. Then S x 3 ,b admits at least one 2-cycle. Part (a) of the above theorem can be interpreted as saying that at least 1/3 of the integers do not belong to L(x 3 , i) with i ≤ 4. In the spirit of the Hasse-Prichett conjecture, we offer the following questions in the case where φ(x) = The authors gratefully acknowledge computing support from the Georgia Advanced Computing Resource Center, and financial support from the Research and Training Group in Algebraic Geometry, Algebra, and Number Theory (AGANT) at the University of Georgia. The authors also thank the referee for a thoughtful report. Let φ(x) be any polynomial taking positive values on Z >0 , and let ℓ ≥ 1 be any integer. It is natural to wonder whether there exist bases b ≥ 2 such that S φ,b admits cycles of length ℓ. We consider this question in this section mainly when φ(x) = x 2 . We start with some general observations for φ(x) = x m , m ≥ 2. Fix ℓ ≥ 2. Choose coprime positive integers α and β such that β divides α 2 ℓ − α, and set γ := α 2 + β 2 . For instance, one can choose α = β = 1 and γ = 2. Set b := (γ 2 ℓ−1 − α)/β. Since β divides α 2 ℓ − α and α 2 = γ − β 2 , we find that b is an integer. Then is an ℓ-cycle for S x 2 ,b . Indeed, it is easy to verify that α, β < b, so that It is easy to check that b does not divide any of the integers γ 2 k for k = 0, . . . , ℓ − 1. Since γ 2 ℓ−1 has only two digits in base b, the smaller integers γ 2 k have at most two digits. Hence, this cycle is a propagating cycle. Let ℓ ≥ 1. Consider the affine space A 2ℓ+1 and label its coordinates by b, and x i , y i , for i = 1, . . . , ℓ. Let V ℓ denote the algebraic subvariety of A 2ℓ+1 defined by x 2 1 + y 2 1 = x 1 + by 1 when ℓ = 1, and in general by the ℓ equations Let now cyc(n 1 , . . . , n ℓ ) be a propagating ℓ-cycle for S x 2 ,b 0 . We will use below the notation x i , y i to denote variables, and use x i , y i to denote specific values. With this notation, we . . , ℓ) satisfies the equations of the variety V ℓ , and thus a propagating ℓ-cycle for S x 2 ,b 0 corresponds to an integer point on the variety V ℓ that satisfies the added requirement that . , x ℓ , y ℓ ) be any point on the variety V ℓ , with coordinates in C. Then there exists a line in A 2ℓ+1 that passes through P and is fully contained in V ℓ . This line can be given by the parametric equations If P is a point with integer coordinates which corresponds to a propagating ℓ-cycle of S x 2 ,b 0 , then for every non-negative integer t, the integer point corresponds to a propagating ℓ-cycle for S x 2 ,b(t) . Proof. The proof of the theorem is not difficult, once the parametric equations (2.1) are available. Indeed, one finds that in C[t], for all i = 1, . . . , ℓ (where the index ℓ + 1 is set to mean index 1). Assume now that P corresponds to a propagating ℓ-cycle of S , and x i (t) = 0. These inequalities follow from the fact that since x i = 0 and Consider an ℓ-cycle cyc(n 1 , . . . , n ℓ ) as in Theorem 2.4, with n i := x i + y i b 0 . Let g := gcd(b 2 0 + 1, n 1 , . . . , n ℓ ). Given the parametrization (2.1), we will call the following parametrization of the same line the reduced integer parametrization of the line: Remark 2.6. For each t ∈ C, we can define an endomorphism ϕ t : V ℓ → V ℓ on the affine variety V ℓ using the ring homomorphism ϕ * t on functions on V ℓ defined as: Assume that S x 2 ,b 0 has s distinct propagating cycles, of lengths ℓ 1 , . . . , ℓ s , respectively (repetitions are allowed). Let t ≥ 0 be any integer, and let b : Then S x 2 ,b has (at least) s distinct propagating cycles, of lengths ℓ 1 , . . . , ℓ s respectively. Proof. When the integers ℓ 1 , . . . , ℓ s are distinct, the statement of the theorem follows immediately from the existence of the 'propagating' lines proved in Theorem 2.4. Suppose now that for some integer ℓ, there are exactly j > 1 indices i such that ℓ i = ℓ. Since we start with j distinct propagating ℓ-cycles, we have j distinct points on V ℓ , and Theorem 2.4 proved the existence of j distinct lines on V ℓ . To conclude the proof of Theorem 2.7, it suffices to prove that these lines do not intersect in V ℓ at a point where t is a positive integer. This can be checked directly. Assume that t = 0, and that we have two ℓ-cycles (b 0 , x 1 , y 1 , . . . ) and We must have (x i − x i ) = 0 and, hence, (y i − y i ) = 0, since otherwise, the above equations imply that (b 0 t + 1) 2 + t 2 = 0. This latter equation is not possible when both t and b 0 are real, which we assume. Denote by PB(ℓ) the set of bases b ≥ 2 such that S x 2 ,b has a propagating ℓ-cycle. Then the set PB(ℓ) contains an arithmetic progression, and has lower density bounded below by 2/(b 2 0 + 1). Proof. The existence of a propagating ℓ-cycle cyc(γ, γ 2 , . . . ) for the base b 0 := 2 2 ℓ−1 − 1 is established in Example 2.3. Since γ = 2, we find that the greatest common divisor of the elements in the cycle is 2. Theorem 2.4 and Remark 2.5 show the existence of an has a propagating ℓ-cycle. The natural density of the set of positive integers in an arithmetic Remark 2.11. Let us show now that PB(1) has natural density 1. More generally, let Proof. The steps in the computations of the four lower bounds given in the above table are the same for each ℓ. First compute a set P of propagating cycles. In our case, we used all propagating cycles with 2 ≤ b ≤ 500. For each propagating cycle cyc(n 1 , n 2 , . . . ) in base b, Theorem 2.4 produces integer lines, which we parametrize using their reduced integer parametrization (see Remark 2.5). The slope of each line is λ := (b 2 + 1)/ gcd(b 2 + 1, n 1 , n 2 , . . . ). Thus we now have a set of explicit arithmetic progressions of the form b + λt which are contained in PB(ℓ). To compute a lower bound for the lower density, we further prune the set of lines from all the lines which do not have prime power slope. The lower density of the set of arithmetic progressions with λ a prime power can be easily bounded below since the slopes are all pairwise coprime and we can use the formula in Remark 2.10 to obtain a lower bound for d(PB(ℓ)). Our computations produce the following data: The data when ℓ = 1 is only included for information, since we know already that d(PB(1)) = 1. The lower bound for d(PB (2)) is improved to d(PB(2)) ≥ 0.5763 in Proposition 3.3. Remark 2.13. Computations indicate that the first integer b such that S x 2 ,b has a propagating ℓ-cycle might be much smaller than 2 2 ℓ−1 − 1 when ℓ > 2. One may wonder whether the first such b might even be bounded by a polynomial function in ℓ. Computations show that for each ℓ ≤ 20, there exists a basis b ≤ 1230 with an ℓ-cycle. In addition to the line described in Theorem 2.4, both varieties V 1 and V 2 contain a second integer line through each integer point. We prove this fact in this section for the variety V 2 and exploit the existence of this second line to study the 2-cycles of S x 2 ,b . Proposition 3.1. Let P := (b 0 , x 0 , y 0 , u 0 , v 0 ) be any point with non-negative rational coefficients on the threefold V 2 (defined just before Theorem 2.4) outside of the lines (t, 0, 0, 0, 0) and (t, 1, 0, 1, 0). Then there exist two lines in A 5 , defined by equations with coefficients in Q, which are entirely contained in V 2 and pass through P . Proof. Start with ten variables x 0 , x 1 , y 0 , y 1 , u 0 , u 1 , v 0 , v 1 , and b 0 , b 1 . Evaluate the two equations for V 2 at the linear polynomials b(t) := b 0 + tx 1 , x(t) := x 0 + tx 1 , y(t) := y 0 + ty 1 , u(t) := u 0 + tu 1 , and v(t) := v 0 + tv 1 to obtain two quadratic polynomials in t, say f := f 2 t 2 +f 1 t+f 0 and g := g 2 t 2 +g 1 t+g 0 . Forcing these two polynomials to vanish identically produces six equations in the ten variables. The constant terms f 0 = x 2 0 + y 2 0 − (u 0 + b 0 v 0 ) and g 0 = u 2 0 + v 2 0 − (x 0 + b 0 y 0 ) are just the two equations of V 2 evaluated at the 0-variables. Magma [1] can verify that , and we see that since D is a sum of monomials which includes u 2 0 + v 2 0 , we must have D > 0 at P since the point P has non-negative coefficients and since u 0 and v 0 are not both zero by hypothesis. Remark 3.2. The line exhibited in Theorem 2.4 is remarkable since it allows us to 'propagate' any given propagating cycle. We believe that the second line on V 2 has the same property. In particular, starting with a propagating 2-cycle, we expect that the expressions X 1 , Y 1 , U 1 , V 1 are all non-negative. This is immediately true for Y 1 since Magma produces a formula which is a sum of monomials, but for the other expressions, the formula involves some negative signs. The propagating property on the other hand can always be checked directly given an explicit propagating cycle, and this is what we do in order to establish our next proposition. Assume that the point P := (b 0 , x 0 , y 0 , u 0 , v 0 ) on V 2 has integer coefficients. Then the second lines can be reparametrized using a change of variables of the form t := λs with λ ∈ N, so that the new equations for the lines have only integer coefficients. In general, there are very large cancellations in the fractions X 1 /D, Y 1 /D, U 1 /D and V 1 /D, and we set in this case λ to be the least common multiple of the denominators of X 1 /D, Y 1 /D, U 1 /D and V 1 /D. We can use the second line through propagating 2-cycles to improve the lower bound given by Proposition 2.12. Proposition 3.3. The set PB(2) of bases b ≥ 2 such that S x 2 ,b has a propagating 2-cycle has lower density bounded below by 0.5763. Proof. Consider the set P N of all propagating 2-cycles with 2 ≤ b ≤ N. As in Proposition 2.12, for each propagating cycle cyc(n 1 , n 2 ) in base b in P N , Theorem 2.4 produces an integer line, which we parametrize using its reduced integer parametrization (see Remark 2.5) . The slope of the line is λ 1 := (b 2 + 1)/ gcd(b 2 + 1, n 1 , n 2 ). Consider the set S 1 of all the lines found this way. Now for each propagating 2-cycle in base b in P N , say cyc(x 0 + by 0 , u 0 + bv 0 ), compute the reduced integer parametrization of the second line, with b(t) = b + λ 2 t, x(t) = x 0 + x 2 t, y(t) = x 0 + y 2 t, u(t) = u 0 + u 2 t, and v(t) = v 0 + v 2 t, and check that this line allows us to propagate the 2-cycle. To check this, we verified that 0 ≤ x 2 , y 2 , u 2 , v 2 ≤ λ 2 . Consider the set S 2 of all the second lines found this way. We now have a set of explicit arithmetic progressions of the form b + λ 1 t or b + λ 2 t which are contained in PB (2) . To compute a lower bound for the lower density, we further prune the set S 1 ∪ S 2 from all the lines whose slope is not a power of a prime. The lower density of the set of arithmetic progressions associated with the remaining lines can be easily bounded below since the lines have slopes that are all pairwise coprime and we can use the formula in Remark 2.10 to obtain a lower bound of 0.5457 when N = 1000 and |P N | = 2885. We can do slightly better by also considering some lines whose slope is not a power of a prime. For instance, when also considering the lines with slopes dividing 2 · 17 3 , we obtain a lower bound of 0.5763 when N = 1000. Let P = (b 0 , x 0 , y 0 , u 0 , v 0 ) be a propagating cycle on V 2 , and consider the two lines passing through it and their reduced integer parametrization with b 1 (t) = b 0 +λ 1 t and b 2 (t) = b 0 +λ 2 t. We have noted already that λ 1 = (b 2 0 + 1)/ gcd(b 2 0 + 1, n 1 , n 2 ) > 1, so that for any positive integer t, b 2 1 (t) + 1 is never prime. Thus no propagated cycle on the first line can have a base b such that b 2 + 1 is prime. On the other hand, quite often, the second line can produce propagated cycles that have a base b such that b 2 + 1 is prime. Our next proposition exploits this property. Proposition 3.4. (a) There exist infinitely many integers b ≥ 2 such that S x 2 ,b has exactly two non-trivial 1-cycles, but b / ∈ L(x 2 , 3) because S x 2 ,b also has a 2-cycle. (b) The Bouniakovsky Conjecture implies that there exist infinitely many integers b ≥ 2 such that S x 2 ,b has no non-trivial 1-cycles, but b / ∈ L(x 2 , 2) because S x 2 ,b also has two distinct 2-cycles. Proof. Part (a) follows from the existence of the second line on V 2 passing through the point P := (8, 2, 3, 5, 1), and given by b = 17t + 8, x = 3t + 2, y = 5t + 3, u = 9t + 5, v = 2t + 1. Indeed, this line has b(t) = 17t + 8, with gcd(17, 65) = 1. It follows from Lemma 3.5 that the integer values of (17x + 8) 2 + 1 are coprime and so we can use [8, Theorem, p. 172 ], fully proved in [9, Theorem 1] , applied to the polynomial (17x + 8) 2 + 1 to obtain that there are infinitely many values b in the arithmetic progression b(t) = 17t + 8 such that b 2 + 1 is the product of two primes. It is clear from the equation of the line that for every positive t, S x 2 ,b(t) has a propagating 2-cycle. Part (b) follows from the existence of a second line with a similar property. Starting with the 2-cycle (24, 16, 6, 4, 12) , we find using the proof of Proposition 3.1 that the second line on V 2 through that point is given by b = 53t + 24, x = 34t + 16, y = 13t + 6, u = 8t + 4, v = 25t + 12. Again, all the coefficients of the line are positive, and it is easy to verify that for all t > 0, x, y, u, v < b. Thus for each t, the corresponding b is such that S x 2 ,b has a 2-cycle. It is easy to verify that gcd(53, 24 2 + 1) = 1. Finally, we can find a point in the intersection of the arithmetic progressions 17t + 8 and 53t + 24; for instance when x 0 = 400 and x 1 = 128, we have 17x 0 + 8 = 53x 1 + 24 = 6808. Thus we can consider the progression 17 · 53t + 6808, and Lemma 3.5 (b) shows that the integer values of (17 · 53x + 6808) 2 + 1 are coprime. Hence, the Bouniakovsky Conjecture implies that there exist infinitely many integers t such that (17 · 53t + 6808) 2 + 1 is prime and, therefore, there exist infinitely many integers b of the form b = 17 · 53t + 6808 such that b 2 + 1 is prime. For each such integer, we find that S x 2 ,b has two 2-cycles by construction. Proof. (a) If p is a prime which divides all the values of (cx + d) 2 + 1 when x is an integer, then p divides d 2 + 1, c(c + 2d) and c(c − 2d). Hence, if p does not divide c, then p divides c + 2d and c − 2d, and thus divides 4d. It follows that p = 2. But this is a contradiction, since then c is odd, and then c 2 + 2cd is also odd. Thus p divides gcd(c, d 2 + 1). Reciprocally, if p divides c and d 2 + 1, it is clear that p divides all the values of (cx + d) 2 + 1 when x is an integer. (b) In view of part (a), it suffices to prove that gcd((c 0 x 0 + d 0 ) 2 + 1, c 0 c 1 ) = 1. Remark 3.6. The two lines used in the proof of Proposition 3.4 are far from unique, and many other such lines could have been used. In fact, we believe that there are infinitely many propagating 2-cycles P on V 2 such that the second line passing through P in reduced integer parametrization with b 2 (t) = b 0 + λ 2 t is such that gcd(b 2 0 + 1, λ 2 ) = 1. To speed up the verification of Theorem 1.4, we created in advance a set of about 150 different second lines in reduced integer parametrization with gcd(b 2 0 + 1, λ 2 ) = 1, and computed all bases b ≤ 10 6 such that b 2 + 1 is prime and such that S x 2 ,b has a known 2-cycle on one of our 150 such lines. To eliminate such a b from L(x 2 , 2) required then to produce only one cycle of length greater than 2 for S x 2 ,b , which is a very quick computation. Example 3.7. Consider b 0 := 288504, an unusual base discovered when verifying Theorem 1.5. In this case, S x 2 ,b 0 has exactly 104 distinct cycles, all of them of length at most 7. All non-trivial cycles are propagating, with forty-seven 1-cycles, thirty-nine 2-cycles, ten 3-cycles, six 5-cycles, and one cycle of length 4, 6, and 7, respectively. To illustrate propagation, note that the very first base b > 2 to have a 7-cycle is b = 15, with c := cyc(50, 34, 20, 26, 122, 68, 80) (see [7] , page 10). 2 The reduced integer parametrization of the line passing through this 7-cycle starts with b(t) = 113t + 15, x 1 (t) = 36t + 5, y 1 (t) = 25t + 3, etc. We find that when t = 2553, the corresponding integer point on the line produces the 7-cycle for b(t) = 288504 found in our search. All cycles of length at least 2 are found among the orbits of n with 1 ≤ n ≤ 1, 964, 329, 269. Among the thirty-nine propagating 2-cycles, one of them, cyc(36253850477, 38091031810) is such that the second line associated to it has gcd(b 2 0 + 1, λ 2 ) = 1 when written in reduced integer parametrization. In this section, we complement Subramanian's Theorem 1.3 with Proposition 4.1, and further study the surface V 1 associated with 1-cycles when φ(x) = x 2 . Proof. We leave it to the reader to check that N is a non-trivial 1-cycle. By hypothesis, . Since x and x − 1 are coprime, we find that y = gh and b − y = g ′ h ′ . Then x(x − 1) = (gg ′ )(hh ′ ). By definition, again since x and x − 1 are coprime, we find that gg ′ is coprime to x − 1, and it follows that gg ′ divides x. The same argument shows that hh ′ divides x − 1. The equality x(x − 1) = (gg ′ )(hh ′ ) implies then that gg ′ = x and hh ′ = x − 1, proving Part (a). We claim that d > 1. Indeed, if d = 1, then n = x + by divides x + by − y 2 and, hence, divides y 2 . This is a contradiction since 0 < y 2 < x + by. Similarly, D > 1 since otherwise N divides x + by − y 2 , which is also a contradiction since N > x + by − y 2 . The reader will check directly that nN = (b 2 + 1)(x + by − y 2 ) = (b 2 + 1)x 2 . Note that it follows from this equality that n = N, since otherwise b 2 + 1 would be a square, which is not possible since b > 0. Using Part (a) and this equality, we find that (n/g 2 )(N/g ′2 ) = b 2 + 1. It is then clear from this latter equality that (n/g 2 ) divides d, and that (N/g ′2 ) divides D. To finish the proof of Part (b), it suffices to prove that dD = b 2 + 1. For this, it suffices to show that for every prime p, we have ord p (dD) = ord p (b 2 + 1). First, note that dD and b 2 + 1 have the same prime divisors. Indeed, it is clear from the definitions that if p divides either d or D, then it divides b 2 + 1. On the other hand, if p divides b 2 + 1, then it divides nN and, hence, it divides d or D. Let us show now that for every prime p, ord p (dD) ≤ ord p (b 2 + 1). The inequality is clear if either α := ord p (d) = 0 or β := ord p (D) = 0, so we may assume that α, β > 0. Then p α · p β divides nN and since nN = (b 2 + 1)x 2 , we obtained the desired inequality if we show that p does not divide x. Assume by contradiction that p divides x. Since by hypothesis, p also divides n = x + by, we find that p divides by and, hence, p divides y because p cannot divide b since it divides b 2 + 1. Again by hypothesis, p divides N, so p divides N − x + by = b 2 , which is impossible. As a result, p does not divide x. We now show that for every prime p, ord p (dD) ≥ ord p (b 2 + 1). Let γ := ord p (b 2 + 1) > 0, and assume by contradiction that γ > α + β. Then γ > α and γ > β, which by definition implies that α = ord p (n) and β = ord p (N). This is a contradiction, since we can conclude from (b 2 + 1)x 2 = nN that γ ≤ ord p (nN) = α + β. Proof. It is straightforward to check that the two lines described in the proposition lie on the surface V 1 . The equations for these two lines were found using the same method as in the proof of Proposition 3.1, and this method shows that exactly two lines through P exist. Recall that the line in Theorem 2.4 is given by the parametric equations To see that it equals the first line of the proposition, we make the change of variable t = (b 2 0 + 1)s in the first line, and t = ((x 0 − 1) 2 + y 2 0 )s in the other line, so that b((b 2 0 + 1)s) = B(((x 0 − 1) 2 + y 2 0 )s). It remains to note that In this section, φ(x) = x 3 . We exhibit below several parametric families of 1-cycles for S x 3 ,b . After we became aware of [4] , we noted that most of Proposition 5.1 already appears as Theorems 2-5 in [4] . Only parts (c) and (d) in Proposition 5.1 are in slightly stronger form than in [4] . (c) Let b = 9k + 3. Then n := [6k + 2, 4k + 2, 5k + 1] b is a 1-cycle for S x 3 ,b . (d) Let b = 9k + 6. Then n := [6k + 4, 2k + 1, 7k + 5] b is a 1-cycle for S x 3 ,b . Proof. An integer n := [x, y, z] b is a 1-cycle for S x 3 ,b if and only if the equation is satisfied. That this is the case can be checked directly. Remark 5.2. There are bases b of the form b = 9k, such as b = 72, 90, or 270, for which S x 3 ,b does not have any non-trivial 1-cycle. The bases b = 18, 27, and 54 have exactly one non-trivial 1-cycle, and b = 108 and 153 have exactly one non-trivial 1-cycle, which has 4 digits when written in base b (note that it follows from Theorem 1.2 that a 1-cycle [n] for S x 3 ,b is such that n has at most 4 digits in base b). Thus Proposition 5.1 cannot immediately be generalized to include the case where b = 9k. But when b = 9k 2 , Proposition 5.4 shows that S x 3 ,b has at least six non-trivial 1-cycles. When 9 divides b, we have only succeeded in producing parametric families of 1-cycles where b is a quadratic function of k, as in our next proposition. Proof. An integer n := [x, y] b is a 1-cycle for S x 3 ,b if and only if the equation x 3 + y 3 = x + yb is satisfied. Looking at this equation in the form x(x − 1)(x + 1) = y(b − y 2 ), we can impose that y divide one of the factors x, x + 1, or x − 1, and solve for b := y 2 + x(x − 1)(x + 1)/y. If we want for 9 to divide b, we need to impose that y = 3k, and when we impose that y divide x, we can take for instance x = 27k, leading to the statement of the proposition. When m = 3, the parametrizations above produce 1-cycles when b = 2c 2 − 1, 2c 2 − c + 1, and 2c 2 + c + 1. Unfortunately, none of these values of b are divisible by 3. In particular, the cycles associated to the orbits of n ∈ {1, . . . , a} under S φ,b are all pairwise distinct, so that S φ,b has at least a distinct cycles. Proof. Write n = d i=0 n i b i in base b. Then It follows that the cycles associated to the orbits of n ∈ {1, . . . , a} under S φ,b are all pairwise distinct. Proof of Proposition 6.1. Suppose that p is a prime such that p − 1 divides m − 1. Then for all n ∈ Z, n m ≡ n (mod p). Suppose now that p > b − 1 and that ϕ(p r ) = p r−1 (p − 1) divides m − 1. Then the class of every integer n ≤ p − 1 is a unit in Z/p r Z, and so by Euler's Theorem, n m ≡ n (mod p r ). It follows that N(m, b) divides n m − n for all integers in {0, 1, . . . , b − 1}, and we can apply Proposition 6.2 with a = gcd(b − 1, N(m, b) ). Proof. We know that [1] is a cycle. Using Proposition 6.2, we obtain that the orbit of n = 3 produces a cycle consisting entirely of integers congruent to 0 modulo 3. Proposition 5.1 (a) exhibits three non-trivial cycles consisting of integers congruent to 1 or 2 modulo 3. General results on singular cubic surfaces in A 3 predict that W 1 can contain at most 15 lines of A 3 (use [3], Lemma 3 (c) and [3, page 255]). Unfortunately, none of these lines produces non-trivial 1-cycles for S x 3 /Q denote the algebraic surface defined by the equation x 3 + y 3 − (x + b 2 y) = 0 b), (c), and (d) As noted already in Example 2.2, we have the following parametric family: when b = c 4 , then cyc(c 3 , c 9 ) is a 2-cycle for S x 3 ,b , and in this example, one of the integer in the cycle is a 3-digit number in base b, since c 9 Let b ≥ 2. Then S x m ,b has at least gcd(b − 1, N) distinct cycles. In particular, when m ≥ 5 is prime and b = mk + 1, then S x m ,b has at least m distinct cycles Let b ≥ 2 and set B := {0, 1, . . . , b − 1}. Let φ : B → Z ≥0 be any map S φ,b (n) ≡ n (mod a) for all n ∈ Z ≥0 The Magma algebra system. I. The user language Sur les diviseurs numériques invariables des fonctions rationnelles entières On the classification of cubic surfaces Finding pluperfect digital invariants: techniques, results and observations Generalized happy numbers, Fibonacci Quart Some problems of partitio numerorum; III: On the expression of a number as a sum of primes A conjecture on digital cycles Almost-primes represented by quadratic polynomials Almost-primes represented by quadratic polynomials The On-Line Encyclopedia of Integer Sequences Sums of functions of digits On bases and cycles Proposition 5.7. Let W denote the algebraic variety in A 5 defined by the equations x 3 +y 3 = u + bv and u 3 + v 3 = x + by. The variety W contains the following two rational curves given by the parametrizations b(t) := 9t 2 + 15t + 7, x(t) := 2t + 2, y(t)Proof. It is straightforward to verify that (b(t), x(t), y(t), u(t), v(t)) verifies the equations of W in both cases. It is also clear that 0 ≤ x(t), y(t), u(t), v(t) < b(t).Note that b(t)−1 factorizes for both parametrizations, as (3t+2)(3t+3) and (3t+3)(3t+4), respectively. Thus for any integer t, b(t) is of the form n(n + 1) + 1 with either n or n + 1 divisible by 3. A lower bound on the number of distinct cycles of S x m ,bIn this section, we slightly generalize Theorem 12 of H. Grundman and E. Teeple in [5] from the case φ(x) =