Let b≥2 be an integer, and write the base b expansion of any non-negative integer n as n=x0+x1b+⋯+xdbd, with xd>0 and 0≤xi<b for i=0,…,d. Let ϕ(x) denote an integer polynomial such that ϕ(n)>0 for all n>0. Consider the map Sϕ,b:ℤ≥0→ℤ≥0, with Sϕ,b(n):=ϕ(x0)+⋯+ϕ(xd). It is known that the orbit set {n,Sϕ,b(n),Sϕ,b(Sϕ,b(n)),…,} 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 ℓ≥1 and let ϕ(x)=x2. We show that the set of bases b≥2 which have at least one cycle of length ℓ 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.