  
  [1X7 [33X[0;0YExamples[133X[101X
  
  [33X[0;0YThis  chapter  discusses  a  number  of  [21Xnice[121X  examples of rcwa mappings and
  -groups  in  detail.  All of them show different aspects of the package, and
  the order in which they appear is entirely arbitrary. In particular they are
  not ordered by degree of difficulty or interest.[133X
  
  [33X[0;0YThe rcwa mappings, rcwa groups and other objects defined in this chapter can
  be  found  in  the  file [11Xpkg/rcwa/examples/examples.g[111X. This file can be read
  into  the current [5XGAP[105X session by the function [2XLoadRCWAExamples[102X ([14X6.1-1[114X) which
  takes  no arguments and returns a record containing all examples. The global
  variable  assignments  made  in  a  section  of  this chapter can be made by
  applying  the  function  [10XAssignGlobals[110X  to  the  respective component of the
  record  returned  by  [10XLoadRCWAExamples[110X. The component names are given at the
  end of the corresponding sections.[133X
  
  [33X[0;0YThe  discussions of the examples are typically far from being exhaustive. It
  is quite likely that in many instances by just a few little modifications or
  additional  easy  commands  you  can find out interesting things yourself --
  have fun![133X
  
  
  [1X7.1 [33X[0;0YThe Higman-Thompson group[133X[101X
  
  [33X[0;0YThe  Higman-Thompson  group  is  a finitely presented infinite simple group,
  cf. [Hig74].[133X
  
  [33X[0;0YWe show that the group[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := Group(List([[0,2,1,4],[0,4,1,4],[1,4,2,4],[2,4,3,4]],[127X[104X
    [4X[25X>[125X [27X                   ClassTransposition));[127X[104X
    [4X[28X<(0(2),1(4)),(0(4),1(4)),(1(4),2(4)),(2(4),3(4))>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0Yis  isomorphic  to  the  Higman-Thompson  group.  This  isomorphism has been
  pointed  out  by  John  P.  McDermott.  We  take a slightly different set of
  generators[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk := ClassTransposition(0,2,1,2);;[127X[104X
    [4X[25Xgap>[125X [27Xl := ClassTransposition(1,2,2,4);;[127X[104X
    [4X[25Xgap>[125X [27Xm := ClassTransposition(0,2,1,4);;[127X[104X
    [4X[25Xgap>[125X [27Xn := ClassTransposition(1,4,2,4);;[127X[104X
    [4X[25Xgap>[125X [27XH := Group(k,l,m,n);[127X[104X
    [4X[28X<(0(2),1(2)),(1(2),2(4)),(0(2),1(4)),(1(4),2(4))>[128X[104X
    [4X[25Xgap>[125X [27XG = H; # k, l, m and n generate G as well[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNow  we  verify  that  our  four  generators  satisfy the relations given on
  page 50 in [Hig74], when we read [10Xk[110X as [22Xκ[122X, [10Xl[110X as [22Xλ[122X, [10Xm[110X as [22Xμ[122X and [10Xn[110X as [22Xν[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHigmanThompsonRels :=[127X[104X
    [4X[25X>[125X [27X[ k^2, l^2, m^2, n^2,                           # (1) in Higman's book[127X[104X
    [4X[25X>[125X [27X  l*k*m*k*l*n*k*n*m*k*l*k*m,                    # (2)        "[127X[104X
    [4X[25X>[125X [27X  k*n*l*k*m*n*k*l*n*m*n*l*n*m,                  # (3)        "[127X[104X
    [4X[25X>[125X [27X  (l*k*m*k*l*n)^3, (m*k*l*k*m*n)^3,             # (4)        "[127X[104X
    [4X[25X>[125X [27X  (l*n*m)^2*k*(m*n*l)^2*k,                      # (5)        "[127X[104X
    [4X[25X>[125X [27X  (l*n*m*n)^5,                                  # (6)        "[127X[104X
    [4X[25X>[125X [27X  (l*k*n*k*l*n)^3*k*n*k*(m*k*n*k*m*n)^3*k*n*k*n,# (7)        "[127X[104X
    [4X[25X>[125X [27X  ((l*k*m*n)^2*(m*k*l*n)^2)^3,                  # (8)        "[127X[104X
    [4X[25X>[125X [27X  (l*n*l*k*m*k*m*n*l*n*m*k*m*k)^4,              # (9)        "[127X[104X
    [4X[25X>[125X [27X  (m*n*m*k*l*k*l*n*m*n*l*k*l*k)^4,              #(10)        "[127X[104X
    [4X[25X>[125X [27X  (l*m*k*l*k*m*l*k*n*k)^2,                      #(11)        "[127X[104X
    [4X[25X>[125X [27X  (m*l*k*m*k*l*m*k*n*k)^2 ];                    #(12)        "[127X[104X
    [4X[28X[ IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ), [128X[104X
    [4X[28X  IdentityMapping( Integers ), IdentityMapping( Integers ) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  conclude  that  our group is an homomorphic image of the Higman-Thompson
  group.  But  since  the Higman-Thompson group is simple and our group is not
  trivial, this means indeed that the two groups are isomorphic.[133X
  
  [33X[0;0YIn  fact  it  is  straightforward  to  show  that  [10XG[110X is the group [22XCT_∅(ℤ)[122X in
  Corollary 3.7  in [Koh10],  which  is  generated  by  the  set  of all class
  transpositions  which  interchange residue classes modulo powers of 2. First
  we  check  that  [10XG[110X  contains  all  11 class transpositions which interchange
  residue classes modulo 2 or 4:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS := Filtered(List(ClassPairs(4),ClassTransposition),[127X[104X
    [4X[25X>[125X [27X                 ct->Mod(ct) in [2,4]);[127X[104X
    [4X[28X[ ( 0(2), 1(2) ), ( 0(2), 1(4) ), ( 0(2), 3(4) ), ( 0(4), 1(4) ), [128X[104X
    [4X[28X  ( 0(4), 2(4) ), ( 0(4), 3(4) ), ( 1(2), 0(4) ), ( 1(2), 2(4) ), [128X[104X
    [4X[28X  ( 1(4), 2(4) ), ( 1(4), 3(4) ), ( 2(4), 3(4) ) ][128X[104X
    [4X[25Xgap>[125X [27XIsSubset(G,S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThen  we  give a function which takes a class transposition [22Xτ ∈ CT_∅(ℤ)[122X, and
  which returns a factorization of an element [22Xγ[122X satisfying [22Xτ^γ ∈ S[122X into [22Xg_1 :=
  (0(2),1(4))  ∈  S[122X,  [22Xg_2  :=  (0(2),3(4)) ∈ S[122X, [22Xg_3 := (1(2),0(4)) ∈ S[122X, [22Xg_4 :=
  (1(2),2(4)) ∈ S[122X, [22Xh_1 := (0(4),1(4)) ∈ S[122X and [22Xh_2 := (1(4),2(4)) ∈ S[122X:[133X
  
  [4X[32X  GAP code  [32X[104X
    [4X[104X
    [4XReducingConjugator := function ( tau )[104X
    [4X[104X
    [4X  local  w, F, g1, g2, g3, g4, h1, h2, h, cls, cl, r;[104X
    [4X[104X
    [4X  g1 := ClassTransposition(0,2,1,4); h1 := ClassTransposition(0,4,1,4);[104X
    [4X  g2 := ClassTransposition(0,2,3,4); h2 := ClassTransposition(1,4,2,4);[104X
    [4X  g3 := ClassTransposition(1,2,0,4);[104X
    [4X  g4 := ClassTransposition(1,2,2,4);[104X
    [4X[104X
    [4X  F := FreeGroup("g1","g2","g3","g4","h1","h2");[104X
    [4X[104X
    [4X  w := One(F); if Mod(tau) <= 4 then return w; fi;[104X
    [4X[104X
    [4X  # Before we can reduce the moduli of the interchanged residue classes,[104X
    [4X  # we must make sure that both of them have at least modulus 4.[104X
    [4X  cls := TransposedClasses(tau);[104X
    [4X  if Mod(cls[1]) = 2 then[104X
    [4X    if Residue(cls[1]) = 0 then[104X
    [4X      if Residue(cls[2]) mod 4 = 1 then tau := tau^g2; w := w * F.2;[104X
    [4X                                   else tau := tau^g1; w := w * F.1; fi;[104X
    [4X    else[104X
    [4X      if Residue(cls[2]) mod 4 = 0 then tau := tau^g4; w := w * F.4;[104X
    [4X                                   else tau := tau^g3; w := w * F.3; fi;[104X
    [4X    fi;[104X
    [4X  fi;[104X
    [4X[104X
    [4X  while Mod(tau) > 4 do # Now we can successively reduce the moduli.[104X
    [4X    if not ForAny(AllResidueClassesModulo(2),[104X
    [4X                  cl -> IsEmpty(Intersection(cl,Support(tau))))[104X
    [4X    then[104X
    [4X      cls := TransposedClasses(tau);[104X
    [4X      h := Filtered([h1,h2],[104X
    [4X             hi->Length(Filtered(cls,cl->IsSubset(Support(hi),cl)))=1);[104X
    [4X      h := h[1]; tau := tau^h;[104X
    [4X      if h = h1 then w := w * F.5; else w := w * F.6; fi;[104X
    [4X    fi;[104X
    [4X    cl := TransposedClasses(tau)[2]; # class with larger modulus[104X
    [4X    r  := Residue(cl);[104X
    [4X    if   r mod 4 = 1 then tau := tau^g1; w := w * F.1;[104X
    [4X    elif r mod 4 = 3 then tau := tau^g2; w := w * F.2;[104X
    [4X    elif r mod 4 = 0 then tau := tau^g3; w := w * F.3;[104X
    [4X    elif r mod 4 = 2 then tau := tau^g4; w := w * F.4; fi;[104X
    [4X  od;[104X
    [4X[104X
    [4X  return w;[104X
    [4Xend;[104X
    [4X[104X
  [4X[32X[104X
  
  [33X[0;0YAfter  assigning  [10Xg1[110X,  [10Xg2[110X,  [10Xg3[110X,  [10Xg4[110X,  [10Xh1[110X and [10Xh2[110X appropriately, we obtain for
  example:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XReducingConjugator(ClassTransposition(3,16,34,256));[127X[104X
    [4X[28Xh2*g1*h1*g1*h1*g1*h1*g1*h2*g2*h2*g4*h2*g4*h2*g3[128X[104X
    [4X[25Xgap>[125X [27Xgamma := h2*g1*h1*g1*h1*g1*h1*g1*h2*g2*h2*g4*h2*g4*h2*g3;[127X[104X
    [4X[28X<rcwa permutation of Z with modulus 256>[128X[104X
    [4X[25Xgap>[125X [27Xct := ClassTransposition(3,16,34,256)^gamma;;[127X[104X
    [4X[25Xgap>[125X [27XIsClassTransposition(ct);;[127X[104X
    [4X[25Xgap>[125X [27Xct;[127X[104X
    [4X[28XClassTransposition(1,4,2,4)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  Higman-Thompson  group  can  also  be  embedded  in  a natural way into
  CT(GF(2)[x]):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx := Indeterminate(GF(2));; SetName(x,"x");[127X[104X
    [4X[25Xgap>[125X [27XR := PolynomialRing(GF(2),1);;[127X[104X
    [4X[25Xgap>[125X [27Xk := ClassTransposition(0,x,1,x);;[127X[104X
    [4X[25Xgap>[125X [27Xl := ClassTransposition(1,x,x,x^2);;[127X[104X
    [4X[25Xgap>[125X [27Xm := ClassTransposition(0,x,1,x^2);;[127X[104X
    [4X[25Xgap>[125X [27Xn := ClassTransposition(1,x^2,x,x^2);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(k,l,m,n);[127X[104X
    [4X[28X<rcwa group over GF(2)[x] with 4 generators>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  correctness  of  this representation can likewise be verified by simply
  checking the defining relations given above.[133X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().HigmanThompson);[110X  in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.2 [33X[0;0YFactoring Collatz' permutation of the integers[133X[101X
  
  [33X[0;0YIn  1932, Lothar Collatz mentioned in his notebook the following permutation
  of the integers:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XCollatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(Collatz);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa mapping of Z with modulus 3[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 2n/3     if n in 0(3)[128X[104X
    [4X[28X n |-> <  (4n-1)/3 if n in 1(3)[128X[104X
    [4X[28X        | (4n+1)/3 if n in 2(3)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XShortCycles(Collatz,[-50..50],50); # There are some finite cycles:[127X[104X
    [4X[28X[ [ 0 ], [ -1 ], [ 1 ], [ 2, 3 ], [ -2, -3 ], [ 4, 5, 7, 9, 6 ], [128X[104X
    [4X[28X  [ -4, -5, -7, -9, -6 ], [128X[104X
    [4X[28X  [ 44, 59, 79, 105, 70, 93, 62, 83, 111, 74, 99, 66 ], [128X[104X
    [4X[28X  [ -44, -59, -79, -105, -70, -93, -62, -83, -111, -74, -99, -66 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  cycle  structure  of  Collatz'  permutation  has  not  been  completely
  determined yet. In particular it is not known whether the cycle containing 8
  is  finite  or infinite. Nevertheless, the factorization routine included in
  this  package  can  determine a factorization of this permutation into class
  transpositions, i.e. involutions interchanging two disjoint residue classes:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XCollatz in CT(Integers);  # `Collatz' lies in the simple group CT(Z).[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XLength(Factorization(Collatz));[127X[104X
    [4X[28X212[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSetting  the  Info  level of [10XInfoRCWA[110X equal to 2 (simply issue [10XRCWAInfo(2);[110X)
  causes  the  factorization  routine  to  display detailed information on the
  progress  of the factoring process. For reasons of saving space, this is not
  done in this manual.[133X
  
  [33X[0;0YWe  would like to get a factorization into fewer factors. Firstly, we try to
  factor  the  inverse  --  just  like  the various options interpreted by the
  factorization  routine,  this  has  influence  on decisions taken during the
  factoring process:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XLength(Factorization(Collatz^-1));[127X[104X
    [4X[28X129[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThis  is  already  a shorter product, but can still be improved. We remember
  the  [10XmKnot[110X's,  of  which  the  permutation  [10XmKnot(3)[110X  looks  very similar to
  Collatz'  permutation. Therefore it is straightforward to try to factor both
  [10XmKnot(3)[110X and [10XCollatz/mKnot(3)[110X, and to look whether the sum of the numbers of
  factors is less than 129:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XKnotFacts := Factorization(mKnot(3));;[127X[104X
    [4X[25Xgap>[125X [27XQuotFacts := Factorization(Collatz/mKnot(3));;[127X[104X
    [4X[25Xgap>[125X [27XList([KnotFacts,QuotFacts],Length);[127X[104X
    [4X[28X[ 59, 9 ][128X[104X
    [4X[25Xgap>[125X [27XCollatzFacts := Concatenation(QuotFacts,KnotFacts);[127X[104X
    [4X[28X[ ( 0(6), 4(6) ), ( 0(6), 5(6) ), ( 0(6), 3(6) ), ( 0(6), 1(6) ), [128X[104X
    [4X[28X  ( 0(6), 2(6) ), ( 2(3), 4(6) ), ( 0(3), 4(6) ), ( 2(3), 1(6) ), [128X[104X
    [4X[28X  ( 0(3), 1(6) ), ( 0(36), 35(36) ), ( 0(36), 22(36) ), [128X[104X
    [4X[28X  ( 0(36), 18(36) ), ( 0(36), 17(36) ), ( 0(36), 14(36) ), [128X[104X
    [4X[28X  ( 0(36), 20(36) ), ( 0(36), 4(36) ), ( 2(36), 8(36) ), [128X[104X
    [4X[28X  ( 2(36), 16(36) ), ( 2(36), 13(36) ), ( 2(36), 9(36) ), [128X[104X
    [4X[28X  ( 2(36), 7(36) ), ( 2(36), 6(36) ), ( 2(36), 3(36) ), [128X[104X
    [4X[28X  ( 2(36), 10(36) ), ( 2(36), 15(36) ), ( 2(36), 12(36) ), [128X[104X
    [4X[28X  ( 2(36), 5(36) ), ( 21(36), 28(36) ), ( 21(36), 33(36) ), [128X[104X
    [4X[28X  ( 21(36), 30(36) ), ( 21(36), 23(36) ), ( 21(36), 34(36) ), [128X[104X
    [4X[28X  ( 21(36), 31(36) ), ( 21(36), 27(36) ), ( 21(36), 25(36) ), [128X[104X
    [4X[28X  ( 21(36), 24(36) ), ( 26(36), 32(36) ), ( 26(36), 29(36) ), [128X[104X
    [4X[28X  ( 10(18), 35(36) ), ( 5(18), 35(36) ), ( 10(18), 17(36) ), [128X[104X
    [4X[28X  ( 5(18), 17(36) ), ( 8(12), 14(24) ), ( 6(9), 17(18) ), [128X[104X
    [4X[28X  ( 3(9), 17(18) ), ( 0(9), 17(18) ), ( 6(9), 16(18) ), ( 3(9), 16(18) ),[128X[104X
    [4X[28X  ( 0(9), 16(18) ), ( 6(9), 11(18) ), ( 3(9), 11(18) ), ( 0(9), 11(18) ),[128X[104X
    [4X[28X  ( 6(9), 4(18) ), ( 3(9), 4(18) ), ( 0(9), 4(18) ), ( 0(6), 14(24) ), [128X[104X
    [4X[28X  ( 0(6), 2(24) ), ( 8(12), 17(18) ), ( 7(12), 17(18) ), [128X[104X
    [4X[28X  ( 8(12), 11(18) ), ( 7(12), 11(18) ), PrimeSwitch(3)^-1, [128X[104X
    [4X[28X  ( 7(12), 17(18) ), ( 2(6), 17(18) ), ( 0(3), 17(18) ), [128X[104X
    [4X[28X  PrimeSwitch(3)^-1, PrimeSwitch(3)^-1, PrimeSwitch(3)^-1 ][128X[104X
    [4X[25Xgap>[125X [27XProduct(CollatzFacts) = Collatz; # Check.[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe   factors   [10XPrimeSwitch(3)[110X   are  products  of  6  class  transpositions
  (cf. [2XPrimeSwitch[102X ([14X2.5-2[114X)).[133X
  
  [33X[0;0YEnter [10XAssignGlobals(LoadRCWAExamples().CollatzlikePerms);[110X in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.3 [33X[0;0YThe [22X3n+1[122X[101X[1X group[133X[101X
  
  [33X[0;0YThe  following  group  acts transitively on the set of positive integers for
  which the [22X3n+1[122X conjecture holds and which are not divisible by 6:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := ClassTransposition(1,2,4,6);;[127X[104X
    [4X[25Xgap>[125X [27Xb := ClassTransposition(1,3,2,6);;[127X[104X
    [4X[25Xgap>[125X [27Xc := ClassTransposition(2,3,4,6);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(a,b,c);[127X[104X
    [4X[28X<(1(2),4(6)),(1(3),2(6)),(2(3),4(6))>[128X[104X
    [4X[25Xgap>[125X [27Xdata := LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions();;[127X[104X
    [4X[25Xgap>[125X [27Xdata.Id3CTsGroup(G,data.grps); # the 'catalogue number' of G[127X[104X
    [4X[28X44132[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YTo see this, consider the action of [22XG[122X on the [21X[22X3n+1[122X tree[121X. The vertices of this
  tree  are the positive integers for which the [22X3n+1[122X conjecture holds, and for
  every  vertex [22Xn[122X there is an edge from [22Xn[122X to [22XT(n)[122X, where [22XT[122X denotes the Collatz
  mapping[133X
  
                                        /
                                        | n/2 if n even,
                 T:  Z -> Z,   n  |->  <
                                        | (3n+1)/2 if n odd
                                        \
  
  [33X[0;0Y(cf. Chapter [14X1[114X). It is easy to check that for every vertex [22Xn[122X, either [22Xa[122X, [22Xb[122X or
  [22Xc[122X  maps  [22Xn[122X to [22XT(n)[122X, and that the other two generators either fix [22Xn[122X or map it
  to one of its preimages under [22XT[122X. So the [22X3n+1[122X conjecture is equivalent to the
  assertion that the group [22XG[122X acts transitively on [22XN ∖ 0(6)[122X. First let's have a
  look at balls of small radius about 1 under the action of [22XG[122X -- these consist
  of those numbers whose trajectory under [22XT[122X reaches 1 quickly:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XBall(G,1,5,OnPoints);[127X[104X
    [4X[28X[ 1, 2, 4, 5, 8, 10, 16, 32, 64 ][128X[104X
    [4X[25Xgap>[125X [27XBall(G,1,10,OnPoints);[127X[104X
    [4X[28X[ 1, 2, 3, 4, 5, 8, 10, 13, 16, 20, 21, 26, 32, 40, 52, 53, 64, 80, 85, [128X[104X
    [4X[28X  128, 160, 170, 256, 320, 340, 341, 512, 1024, 2048 ][128X[104X
    [4X[25Xgap>[125X [27XBall(G,1,15,OnPoints);[127X[104X
    [4X[28X[ 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 20, 21, 22, 23, 26, 32, 34, [128X[104X
    [4X[28X  35, 40, 44, 45, 46, 52, 53, 64, 68, 69, 70, 75, 80, 85, 104, 106, 113, [128X[104X
    [4X[28X  128, 136, 140, 141, 151, 160, 170, 208, 212, 213, 226, 227, 256, 272, [128X[104X
    [4X[28X  277, 280, 301, 302, 320, 340, 341, 416, 424, 452, 453, 454, 512, 640, [128X[104X
    [4X[28X  680, 682, 832, 848, 853, 904, 908, 909, 1024, 1280, 1360, 1364, 1365, [128X[104X
    [4X[28X  1664, 1696, 1706, 1808, 1813, 1816, 2048, 2560, 2720, 2728, 4096, [128X[104X
    [4X[28X  5120, 5440, 5456, 5461, 8192, 10240, 10880, 10912, 10922, 16384, [128X[104X
    [4X[28X  32768, 65536 ][128X[104X
    [4X[25Xgap>[125X [27XBall(G,1,15,OnPoints:Spheres);[127X[104X
    [4X[28X[ [ 1 ], [ 2, 4 ], [ 8 ], [ 16 ], [ 5, 32 ], [ 10, 64 ], [128X[104X
    [4X[28X  [ 3, 20, 21, 128 ], [ 40, 256 ], [ 13, 80, 85, 512 ], [128X[104X
    [4X[28X  [ 26, 160, 170, 1024 ], [ 52, 53, 320, 340, 341, 2048 ], [128X[104X
    [4X[28X  [ 17, 104, 106, 113, 640, 680, 682, 4096 ], [128X[104X
    [4X[28X  [ 34, 35, 208, 212, 213, 226, 227, 1280, 1360, 1364, 1365, 8192 ], [128X[104X
    [4X[28X  [ 11, 68, 69, 70, 75, 416, 424, 452, 453, 454, 2560, 2720, 2728, 16384 [128X[104X
    [4X[28X     ], [128X[104X
    [4X[28X  [ 22, 23, 136, 140, 141, 151, 832, 848, 853, 904, 908, 909, 5120, [128X[104X
    [4X[28X      5440, 5456, 5461, 32768 ], [128X[104X
    [4X[28X  [ 7, 44, 45, 46, 272, 277, 280, 301, 302, 1664, 1696, 1706, 1808, [128X[104X
    [4X[28X      1813, 1816, 10240, 10880, 10912, 10922, 65536 ] ][128X[104X
    [4X[25Xgap>[125X [27XList(Ball(G,1,50,OnPoints:Spheres),Length);[127X[104X
    [4X[28X[ 1, 2, 1, 1, 2, 2, 4, 2, 4, 4, 6, 8, 12, 14, 17, 20, 26, 32, 43, 52, [128X[104X
    [4X[28X  66, 81, 104, 133, 170, 211, 271, 335, 424, 542, 686, 873, 1096, 1376, [128X[104X
    [4X[28X  1730, 2205, 2794, 3522, 4429, 5611, 7100, 8978, 11343, 14296, 18058, [128X[104X
    [4X[28X  22828, 28924, 36532, 46146, 58399, 73713 ][128X[104X
    [4X[25Xgap>[125X [27XFloatQuotientsList(last);[127X[104X
    [4X[28X[ 2., 0.5, 1., 2., 1., 2., 0.5, 2., 1., 1.5, 1.33333, 1.5, 1.16667, [128X[104X
    [4X[28X  1.21429, 1.17647, 1.3, 1.23077, 1.34375, 1.2093, 1.26923, 1.22727, [128X[104X
    [4X[28X  1.28395, 1.27885, 1.2782, 1.24118, 1.28436, 1.23616, 1.26567, 1.2783, [128X[104X
    [4X[28X  1.26568, 1.27259, 1.25544, 1.25547, 1.25727, 1.27457, 1.26712, [128X[104X
    [4X[28X  1.26056, 1.25752, 1.26688, 1.26537, 1.26451, 1.26342, 1.26034, [128X[104X
    [4X[28X  1.26315, 1.26415, 1.26704, 1.26303, 1.26317, 1.26553, 1.26223 ][128X[104X
    [4X[25Xgap>[125X [27XDifference(Filtered([1..100],n->n mod 6 <> 0),Ball(G,1,40,OnPoints));[127X[104X
    [4X[28X[ 27, 31, 41, 47, 55, 62, 63, 71, 73, 82, 83, 91, 94, 95, 97 ][128X[104X
    [4X[25Xgap>[125X [27XT := RcwaMapping([[1,0,2],[3,1,2]]);;[127X[104X
    [4X[25Xgap>[125X [27XList(last2,n->Length(Trajectory(T,n,[1])));[127X[104X
    [4X[28X[ 71, 68, 70, 67, 72, 69, 69, 66, 74, 71, 71, 60, 68, 68, 76 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIt  is  convenient to define an epimorphism from the free group of rank 3 to
  [22XG[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := FreeGroup("a","b","c");[127X[104X
    [4X[28X<free group on the generators [ a, b, c ]>[128X[104X
    [4X[25Xgap>[125X [27Xphi := EpimorphismByGenerators(F,G);[127X[104X
    [4X[28X[ a, b, c ] -> [ ( 1(2), 4(6) ), ( 1(3), 2(6) ), ( 2(3), 4(6) ) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe can compute balls about 1 in [22XG[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XB := Ball(G,One(G),7:Spheres);;[127X[104X
    [4X[25Xgap>[125X [27XList(B,Length);[127X[104X
    [4X[28X[ 1, 3, 6, 12, 24, 48, 96, 192 ][128X[104X
    [4X[25Xgap>[125X [27XList(B[3],Order);[127X[104X
    [4X[28X[ 12, infinity, infinity, infinity, infinity, 12 ][128X[104X
    [4X[25Xgap>[125X [27XList(B[3],g->PreImagesRepresentative(phi,g));[127X[104X
    [4X[28X[ b*a, c*b, c*a, b*c, a*c, a*b ][128X[104X
    [4X[25Xgap>[125X [27Xg := a*b;; Order(g);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(g);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 18, of order 12[128X[104X
    [4X[28X[128X[104X
    [4X[28X( 1(6), 8(36), 4(18), 2(12) ) ( 3(6), 20(36), 10(18) )[128X[104X
    [4X[28X( 5(6), 32(36), 16(18) )[128X[104X
    [4X[28X[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSpending some more time to compute [10XB := Ball(G,One(G),12:Spheres);;[110X, one can
  check  that  [22X(ab)^12[122X  is the shortest word in the generators of [22XG[122X which does
  not  represent  the identity in the free product of 3 cyclic groups of order
  2, but which represents the identity in [22XG[122X. However, the group [22XG[122X has elements
  of other finite orders as well -- for example:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg := (b*a)^3*b*c;; Order(g);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(g);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 36, of order 105[128X[104X
    [4X[28X[128X[104X
    [4X[28X( 8(9), 16(18), 64(72), 256(288), 85(96), 128(144), 32(36) )[128X[104X
    [4X[28X( 7(12), 11(18), 22(36) ) ( 5(18), 10(36), 40(144), 13(48), [128X[104X
    [4X[28X  20(72) ) ( 1(24), 2(36), 4(72) ) ( 14(36), 28(72), 112(288), [128X[104X
    [4X[28X  37(96), 56(144) )[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XOrder(a*c*b*a*b*c*a*c);[127X[104X
    [4X[28X60[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWith  some  more efforts, one finds that e.g. [22X(abc)^2c^b[122X has order 616, that
  [22X(abc)^2b[122X  has  order  2310,  that  [22X(ab)^2a^ca^bc[122X  has  order 27720, and that
  [22Xa(c(ab)^2)^2[122X  has  order  65520.  Of  course [22XG[122X has many elements of infinite
  order as well. Some of them have infinite cycles, like e.g.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg := b*c;;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(g);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 12[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 4n  if n in 1(3)[128X[104X
    [4X[28X        | 2n  if n in 5(6)[128X[104X
    [4X[28X n |-> <  n/2 if n in 2(12)[128X[104X
    [4X[28X        | n/4 if n in 8(12)[128X[104X
    [4X[28X        | n   if n in 0(3)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSinks(g);[127X[104X
    [4X[28X[ 4(12) ][128X[104X
    [4X[25Xgap>[125X [27XTrajectory(g,last[1],10);[127X[104X
    [4X[28X[ 4(12), 16(48), 64(192), 256(768), 1024(3072), 4096(12288), [128X[104X
    [4X[28X  16384(49152), 65536(196608), 262144(786432), 1048576(3145728) ][128X[104X
    [4X[25Xgap>[125X [27XTrajectory(g,4,20);[127X[104X
    [4X[28X[ 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, [128X[104X
    [4X[28X  16777216, 67108864, 268435456, 1073741824, 4294967296, 17179869184, [128X[104X
    [4X[28X  68719476736, 274877906944, 1099511627776 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YOthers  seem  to  have  only  finite cycles. Some of these appear to have [21Xon
  average[121X comparatively [21Xshort[121X cycles, like e.g.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg := a*b*a*c*b*c;[127X[104X
    [4X[28X<rcwa permutation of Z with modulus 144>[128X[104X
    [4X[25Xgap>[125X [27Xcycs := ShortCycles(g,[0..10000],100,10^20);;[127X[104X
    [4X[25Xgap>[125X [27XDifference([0..10000],Union(cycs));[127X[104X
    [4X[28X[  ][128X[104X
    [4X[25Xgap>[125X [27XCollected(List(cycs,Length));[127X[104X
    [4X[28X[ [ 1, 2222 ], [ 3, 1945 ], [ 4, 1111 ], [ 5, 93 ], [ 6, 926 ], [128X[104X
    [4X[28X  [ 7, 31 ], [ 8, 864 ], [ 9, 10 ], [ 10, 289 ], [ 11, 4 ], [ 12, 95 ], [128X[104X
    [4X[28X  [ 13, 1 ], [ 14, 31 ], [ 16, 12 ], [ 18, 4 ], [ 20, 1 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIf  the  cycle of [22Xg[122X containing some [22Xn ∈ ℤ[122X is finite and has a certain length
  [22Xl[122X,  then  there  is  some  [22Xm  ∈  ℤ[122X  such that for every [22Xk ∈ ℤ[122X the cycle of [22Xg[122X
  containing  [22Xn  + km[122X has length [22Xl[122X as well. Thus, in other words, every finite
  cycle  of  [22Xg[122X  [21Xbelongs  to[121X  a  cycle  of  residue classes. (This is a special
  property  of  [22Xg[122X  which  is  not shared by every rcwa permutation -- cf. e.g.
  Collatz' permutation from Section [14X7.2[114X.) We can find some of these infinitely
  many [21Xresidue class cycles[121X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xcycsrc := ShortResidueClassCycles(g,Mod(g),20);[127X[104X
    [4X[28X[ [ 0(6) ], [ 3(6), 160(288), 20(36) ], [128X[104X
    [4X[28X  [ 7(18), 352(864), 44(108), 28(72) ], [128X[104X
    [4X[28X  [ 11(18), 544(864), 2896(4608), 362(576), 68(108), 88(144) ], [128X[104X
    [4X[28X  [ 13(18), 640(864), 80(108), 52(72) ], [ 10(36) ], [ 34(36) ], [128X[104X
    [4X[28X  [ 1(54), 64(2592), 8(324), 4(216), 16(1152), 2(144) ], [128X[104X
    [4X[28X  [ 5(54), 256(2592), 1360(13824), 170(1728), 32(324), 40(432), [128X[104X
    [4X[28X      208(2304), 26(288) ], [128X[104X
    [4X[28X  [ 17(54), 832(2592), 4432(13824), 23632(73728), 2954(9216), 554(1728), [128X[104X
    [4X[28X      104(324), 136(432) ], [128X[104X
    [4X[28X  [ 37(54), 1792(2592), 224(324), 148(216), 784(1152), 98(144) ], [128X[104X
    [4X[28X  [ 41(54), 1984(2592), 10576(13824), 1322(1728), 248(324), 328(432), [128X[104X
    [4X[28X      1744(2304), 218(288) ], [128X[104X
    [4X[28X  [ 53(54), 2560(2592), 13648(13824), 72784(73728), 9098(9216), [128X[104X
    [4X[28X      1706(1728), 320(324), 424(432) ], [ 38(72), 58(108), 304(576) ], [128X[104X
    [4X[28X  [ 62(72), 94(108), 496(576) ] ][128X[104X
    [4X[25Xgap>[125X [27XList(cycsrc,Length);[127X[104X
    [4X[28X[ 1, 3, 4, 6, 4, 1, 1, 6, 8, 8, 6, 8, 8, 3, 3 ][128X[104X
    [4X[25Xgap>[125X [27XSum(List(Flat(cycsrc),cl->1/Mod(cl)));[127X[104X
    [4X[28X97459/110592[128X[104X
    [4X[25Xgap>[125X [27XFloat(last); # about 88% 'coverage'[127X[104X
    [4X[28X0.881248[128X[104X
    [4X[25Xgap>[125X [27Xcycsrc := ShortResidueClassCycles(g,3*Mod(g),20);[127X[104X
    [4X[28X[ [ 0(6) ], [ 3(6), 160(288), 20(36) ], [128X[104X
    [4X[28X  [ 7(18), 352(864), 44(108), 28(72) ], [128X[104X
    [4X[28X  [ 11(18), 544(864), 2896(4608), 362(576), 68(108), 88(144) ], [128X[104X
    [4X[28X  [ 13(18), 640(864), 80(108), 52(72) ], [ 10(36) ], [ 34(36) ], [128X[104X
    [4X[28X  [ 1(54), 64(2592), 8(324), 4(216), 16(1152), 2(144) ], [128X[104X
    [4X[28X  [ 5(54), 256(2592), 1360(13824), 170(1728), 32(324), 40(432), [128X[104X
    [4X[28X      208(2304), 26(288) ], [128X[104X
    [4X[28X  [ 17(54), 832(2592), 4432(13824), 23632(73728), 2954(9216), 554(1728), [128X[104X
    [4X[28X      104(324), 136(432) ], [128X[104X
    [4X[28X  [ 37(54), 1792(2592), 224(324), 148(216), 784(1152), 98(144) ], [128X[104X
    [4X[28X  [ 41(54), 1984(2592), 10576(13824), 1322(1728), 248(324), 328(432), [128X[104X
    [4X[28X      1744(2304), 218(288) ], [128X[104X
    [4X[28X  [ 53(54), 2560(2592), 13648(13824), 72784(73728), 9098(9216), [128X[104X
    [4X[28X      1706(1728), 320(324), 424(432) ], [ 38(72), 58(108), 304(576) ], [128X[104X
    [4X[28X  [ 62(72), 94(108), 496(576) ], [128X[104X
    [4X[28X  [ 23(162), 1120(7776), 5968(41472), 746(5184), 140(972), 184(1296), [128X[104X
    [4X[28X      976(6912), 5200(36864), 650(4608), 122(864) ], [128X[104X
    [4X[28X  [ 35(162), 1696(7776), 9040(41472), 48208(221184), 257104(1179648), [128X[104X
    [4X[28X      32138(147456), 6026(27648), 1130(5184), 212(972), 280(1296) ], [128X[104X
    [4X[28X  [ 73(162), 3520(7776), 440(972), 292(648), 1552(3456), 8272(18432), [128X[104X
    [4X[28X      1034(2304), 194(432) ], [128X[104X
    [4X[28X  [ 77(162), 3712(7776), 19792(41472), 2474(5184), 464(972), 616(1296), [128X[104X
    [4X[28X      3280(6912), 17488(36864), 2186(4608), 410(864) ], [128X[104X
    [4X[28X  [ 89(162), 4288(7776), 22864(41472), 121936(221184), 650320(1179648), [128X[104X
    [4X[28X      81290(147456), 15242(27648), 2858(5184), 536(972), 712(1296) ], [128X[104X
    [4X[28X  [ 127(162), 6112(7776), 764(972), 508(648), 2704(3456), 14416(18432), [128X[104X
    [4X[28X      1802(2304), 338(432) ], [128X[104X
    [4X[28X  [ 14(216), 22(324), 112(1728), 592(9216), 74(1152) ], [128X[104X
    [4X[28X  [ 86(216), 130(324), 688(1728), 3664(9216), 458(1152) ] ][128X[104X
    [4X[25Xgap>[125X [27XList(cycsrc,Length);[127X[104X
    [4X[28X[ 1, 3, 4, 6, 4, 1, 1, 6, 8, 8, 6, 8, 8, 3, 3, 10, 10, 8, 10, 10, 8, 5, [128X[104X
    [4X[28X  5 ][128X[104X
    [4X[25Xgap>[125X [27XSum(List(Flat(cycsrc),Density));[127X[104X
    [4X[28X5097073/5308416[128X[104X
    [4X[25Xgap>[125X [27XFloat(last); # already about 96% 'coverage'[127X[104X
    [4X[28X0.960187[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThere  are  also some elements of infinite order whose cycles seem to be all
  finite, but [21Xon average[121X pretty [21Xlong[121X -- e.g.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg := (b*a*c)^2*a;;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(g);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 288[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | (16n-1)/3   if n in 1(3)[128X[104X
    [4X[28X        | (9n+5)/4    if n in 3(24) U 11(24)[128X[104X
    [4X[28X        | (27n+19)/4  if n in 15(24) U 23(24)[128X[104X
    [4X[28X        | (n-3)/6     if n in 21(24)[128X[104X
    [4X[28X        | (3n+1)/4    if n in 5(24)[128X[104X
    [4X[28X        | (9n+7)/8    if n in 17(48) U 33(48)[128X[104X
    [4X[28X        | (27n+29)/8  if n in 9(48) U 41(48)[128X[104X
    [4X[28X        | (4n-11)/9   if n in 32(36)[128X[104X
    [4X[28X n |-> <  (2n-7)/9    if n in 8(36)[128X[104X
    [4X[28X        | (27n+38)/8  if n in 14(48)[128X[104X
    [4X[28X        | (3n+2)/8    if n in 26(48)[128X[104X
    [4X[28X        | (9n+10)/8   if n in 38(48)[128X[104X
    [4X[28X        | (3n+4)/4    if n in 20(72)[128X[104X
    [4X[28X        | n/4         if n in 56(72)[128X[104X
    [4X[28X        | (9n+14)/16  if n in 2(96)[128X[104X
    [4X[28X        | (27n+58)/16 if n in 50(96)[128X[104X
    [4X[28X        | n           if n in 0(6)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList([1..100],n->Length(Cycle(g,n)));[127X[104X
    [4X[28X[ 6, 1, 6, 6, 6, 1, 194, 6, 216, 26, 26, 1, 26, 194, 65, 26, 26, 1, 216, [128X[104X
    [4X[28X  26, 6, 216, 46, 1, 640, 26, 70, 194, 216, 1, 70, 26, 216, 216, 26, 1, [128X[104X
    [4X[28X  194, 216, 73, 26, 110, 1, 194, 216, 194, 111, 39, 1, 194, 640, 640, [128X[104X
    [4X[28X  194, 26, 1, 171, 194, 204, 640, 216, 1, 111, 70, 91, 26, 194, 1, 216, [128X[104X
    [4X[28X  216, 26, 111, 65, 1, 50, 194, 26, 216, 640, 1, 502, 26, 111, 40, 110, [128X[104X
    [4X[28X  1, 26, 194, 385, 640, 88, 1, 100, 111, 65, 110, 416, 1, 171, 194, 194, [128X[104X
    [4X[28X  640 ][128X[104X
    [4X[25Xgap>[125X [27XLength(Cycle(g,25));[127X[104X
    [4X[28X640[128X[104X
    [4X[25Xgap>[125X [27XMaximum(Cycle(g,25));[127X[104X
    [4X[28X323270249684063829[128X[104X
    [4X[25Xgap>[125X [27XLength(Cycle(g,25855));[127X[104X
    [4X[28X4751[128X[104X
    [4X[25Xgap>[125X [27XMaximum(Cycle(g,25855));[127X[104X
    [4X[28X507359605810239426786254778159924369135184044618585904603866210104085[128X[104X
    [4X[25Xgap>[125X [27Xcycs := ShortCycles(g,[0..50000],10000,10^100);;[127X[104X
    [4X[25Xgap>[125X [27XS := [0..50000];;[127X[104X
    [4X[25Xgap>[125X [27Xfor cyc in cycs do S := Difference(S,cyc); od;[127X[104X
    [4X[25Xgap>[125X [27XS; # no cycle containing some n in [0..50000] has length > 10000 [127X[104X
    [4X[28X[  ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YTaking  a  look  at the lengths of the trajectories of the Collatz mapping [22XT[122X
  starting  at  the points in a cycle, we can see how a cycle of [22Xg[122X goes [21Xup and
  down[121X in the [22X3n+1[122X tree:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList(Cycle(g,25),n->Length(Trajectory(T,n,[1])));[127X[104X
    [4X[28X[ 17, 21, 25, 29, 33, 31, 35, 34, 32, 33, 37, 41, 45, 44, 42, 39, 43, [128X[104X
    [4X[28X  41, 45, 44, 42, 43, 40, 38, 35, 39, 37, 41, 40, 44, 48, 46, 50, 49, [128X[104X
    [4X[28X  47, 48, 45, 42, 46, 44, 48, 47, 45, 46, 50, 49, 47, 43, 41, 38, 39, [128X[104X
    [4X[28X  36, 34, 30, 27, 31, 29, 33, 32, 30, 31, 35, 33, 37, 36, 40, 39, 43, [128X[104X
    [4X[28X  41, 45, 44, 42, 43, 47, 51, 55, 53, 57, 56, 54, 55, 59, 58, 62, 66, [128X[104X
    [4X[28X  64, 68, 67, 65, 66, 63, 60, 64, 62, 66, 65, 63, 64, 68, 67, 65, 61, [128X[104X
    [4X[28X  59, 56, 52, 49, 53, 51, 55, 54, 52, 53, 57, 55, 59, 58, 56, 57, 54, [128X[104X
    [4X[28X  50, 48, 45, 49, 47, 51, 50, 54, 52, 56, 55, 53, 54, 58, 62, 66, 70, [128X[104X
    [4X[28X  74, 72, 76, 75, 79, 83, 87, 91, 90, 94, 93, 97, 95, 99, 98, 96, 97, [128X[104X
    [4X[28X  94, 91, 88, 85, 89, 87, 91, 90, 88, 89, 86, 84, 81, 85, 83, 87, 86, [128X[104X
    [4X[28X  90, 94, 98, 97, 101, 105, 109, 107, 111, 110, 108, 109, 113, 117, 115, [128X[104X
    [4X[28X  119, 118, 122, 126, 125, 123, 120, 124, 122, 126, 125, 123, 124, 121, [128X[104X
    [4X[28X  119, 116, 117, 114, 111, 115, 113, 117, 116, 114, 115, 119, 123, 122, [128X[104X
    [4X[28X  120, 117, 121, 119, 123, 122, 120, 121, 118, 116, 112, 110, 106, 103, [128X[104X
    [4X[28X  107, 105, 109, 108, 106, 107, 111, 109, 113, 112, 116, 114, 118, 117, [128X[104X
    [4X[28X  115, 116, 113, 110, 111, 108, 104, 102, 99, 103, 101, 105, 104, 108, [128X[104X
    [4X[28X  106, 110, 109, 107, 108, 112, 111, 109, 105, 102, 103, 100, 98, 95, [128X[104X
    [4X[28X  92, 96, 94, 98, 97, 95, 96, 93, 91, 88, 92, 90, 94, 93, 97, 101, 105, [128X[104X
    [4X[28X  109, 108, 106, 103, 107, 105, 109, 108, 106, 107, 104, 102, 99, 103, [128X[104X
    [4X[28X  101, 105, 104, 108, 112, 110, 114, 113, 111, 112, 116, 115, 113, 109, [128X[104X
    [4X[28X  106, 110, 108, 112, 111, 109, 110, 114, 112, 116, 115, 113, 114, 111, [128X[104X
    [4X[28X  107, 105, 102, 103, 100, 98, 95, 99, 97, 101, 100, 104, 103, 107, 105, [128X[104X
    [4X[28X  109, 108, 106, 107, 104, 101, 98, 99, 96, 94, 91, 92, 89, 87, 84, 85, [128X[104X
    [4X[28X  82, 80, 77, 81, 79, 83, 82, 86, 85, 89, 88, 86, 83, 80, 81, 78, 76, [128X[104X
    [4X[28X  73, 74, 71, 68, 72, 70, 74, 73, 71, 72, 76, 80, 79, 83, 87, 91, 90, [128X[104X
    [4X[28X  88, 85, 89, 87, 91, 90, 88, 89, 86, 84, 81, 85, 83, 87, 86, 90, 94, [128X[104X
    [4X[28X  92, 96, 95, 93, 94, 98, 96, 100, 99, 97, 98, 102, 106, 110, 114, 113, [128X[104X
    [4X[28X  111, 108, 112, 110, 114, 113, 111, 112, 109, 107, 104, 108, 106, 110, [128X[104X
    [4X[28X  109, 113, 117, 115, 119, 118, 116, 117, 114, 111, 115, 113, 117, 116, [128X[104X
    [4X[28X  114, 115, 119, 118, 116, 112, 110, 107, 108, 105, 103, 100, 104, 102, [128X[104X
    [4X[28X  106, 105, 109, 108, 112, 110, 114, 113, 111, 112, 116, 115, 113, 109, [128X[104X
    [4X[28X  106, 103, 104, 101, 99, 95, 91, 88, 92, 90, 94, 93, 91, 92, 96, 94, [128X[104X
    [4X[28X  98, 97, 95, 96, 100, 98, 102, 101, 105, 104, 102, 99, 100, 97, 93, 89, [128X[104X
    [4X[28X  87, 84, 85, 82, 80, 77, 74, 78, 76, 80, 79, 77, 78, 75, 73, 69, 67, [128X[104X
    [4X[28X  64, 68, 66, 70, 69, 73, 71, 75, 74, 72, 73, 70, 67, 68, 65, 63, 60, [128X[104X
    [4X[28X  64, 62, 66, 65, 69, 68, 66, 63, 64, 61, 59, 56, 60, 58, 62, 61, 65, [128X[104X
    [4X[28X  64, 62, 59, 60, 57, 55, 51, 48, 49, 46, 44, 40, 37, 34, 35, 32, 28, [128X[104X
    [4X[28X  26, 23, 27, 25, 29, 28, 32, 30, 34, 33, 31, 32, 36, 35, 33, 29, 26, [128X[104X
    [4X[28X  27, 24, 22, 19, 23, 21, 25, 24, 28, 27, 25, 22, 23, 20, 18, 14, 18, [128X[104X
    [4X[28X  22, 20, 24, 23, 21, 22, 19, 16, 20, 18, 22, 21, 19, 20, 24, 23, 21, [128X[104X
    [4X[28X  17, 15, 17, 15, 19, 18, 16 ][128X[104X
    [4X[25Xgap>[125X [27Xlngs := List(Cycle(g,25855),n->Length(Trajectory(T,n,[1])));;[127X[104X
    [4X[25Xgap>[125X [27XMinimum(lngs);[127X[104X
    [4X[28X55[128X[104X
    [4X[25Xgap>[125X [27XMaximum(lngs);[127X[104X
    [4X[28X521[128X[104X
    [4X[25Xgap>[125X [27XPosition(lngs,55);[127X[104X
    [4X[28X15[128X[104X
    [4X[25Xgap>[125X [27XPosition(lngs,521);[127X[104X
    [4X[28X2807[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFinally let's have a look at elements of [22XG[122X with small modulus:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XB := RestrictedBall(G,One(G),20,36:Spheres);;[127X[104X
    [4X[25Xgap>[125X [27XList(B,Length);[127X[104X
    [4X[28X[ 1, 3, 6, 12, 4, 6, 6, 4, 4, 4, 6, 6, 3, 3, 2, 0, 0, 0, 0, 0, 0 ][128X[104X
    [4X[25Xgap>[125X [27XSum(last);[127X[104X
    [4X[28X70[128X[104X
    [4X[25Xgap>[125X [27XPosition(last2,0)-2;[127X[104X
    [4X[28X14[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSo  we have 70 elements of modulus 36 or less in [22XG[122X which can be reached from
  the  identity  by  successive multiplication with generators without passing
  elements  with mudulus exceeding 36. Further we see that the longest word in
  the  generators  yielding  an element with modulus at most 36 has length 14.
  Now we double our bound on the modulus:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XB := RestrictedBall(G,One(G),100,72:Spheres);;[127X[104X
    [4X[25Xgap>[125X [27XList(B,Length);[127X[104X
    [4X[28X[ 1, 3, 6, 12, 22, 14, 18, 22, 24, 26, 26, 34, 35, 32, 37, 38, 46, 58, [128X[104X
    [4X[28X  65, 73, 82, 91, 93, 96, 110, 121, 114, 117, 146, 138, 148, 168, 174, [128X[104X
    [4X[28X  196, 215, 214, 232, 255, 280, 305, 315, 359, 377, 371, 363, 366, 397, [128X[104X
    [4X[28X  419, 401, 405, 405, 401, 407, 415, 435, 424, 401, 359, 338, 330, 332, [128X[104X
    [4X[28X  281, 278, 271, 269, 254, 255, 257, 258, 258, 233, 215, 202, 185, 154, [128X[104X
    [4X[28X  121, 88, 55, 35, 20, 10, 5, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [128X[104X
    [4X[28X  0, 0, 0, 0, 0 ][128X[104X
    [4X[25Xgap>[125X [27XSum(last);[127X[104X
    [4X[28X15614[128X[104X
    [4X[25Xgap>[125X [27XPosition(last2,0)-2;[127X[104X
    [4X[28X83[128X[104X
    [4X[25Xgap>[125X [27XCollected(List(Flat(B),Modulus));[127X[104X
    [4X[28X[ [ 1, 1 ], [ 6, 3 ], [ 12, 4 ], [ 18, 2 ], [ 24, 4 ], [ 36, 56 ], [128X[104X
    [4X[28X  [ 48, 4 ], [ 72, 15540 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  observe  that  there  are  15540 elements in [22XG[122X with modulus 72 which are
  [21Xreachable[121X  from  the  identity  by successive multiplication with generators
  without  passing elements with mudulus exceeding 72. Further we see that the
  longest  word  in the generators yielding an element with modulus at most 72
  has length 83.[133X
  
  [33X[0;0YIt is obvious that many questions regarding the group [22XG[122X remain open.[133X
  
  
  [1X7.4 [33X[0;0YA group with huge finite orbits[133X[101X
  
  [33X[0;0YIn this section we investigate a group which has huge finite orbits on ℤ.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := ClassTransposition(0,2,1,2);;[127X[104X
    [4X[25Xgap>[125X [27Xb := ClassTransposition(0,5,4,5);;[127X[104X
    [4X[25Xgap>[125X [27Xc := ClassTransposition(1,4,0,6);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(a,b,c);[127X[104X
    [4X[28X<(0(2),1(2)),(0(5),4(5)),(1(4),0(6))>[128X[104X
    [4X[25Xgap>[125X [27Xdata := LoadDatabaseOfGroupsGeneratedBy3ClassTranspositions();;[127X[104X
    [4X[25Xgap>[125X [27Xdata.Id3CTsGroup(G,data.grps); # the 'catalogue number' of G[127X[104X
    [4X[28X1284[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  look for orbits of length at most 100 containing an integer in the range
  [10X[0..1000][110X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xorbs := ShortOrbits(G,[0..1000],100);;[127X[104X
    [4X[25Xgap>[125X [27XList(orbs,Length);[127X[104X
    [4X[28X[ 16, 2, 24, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 2, 2, 40, 2, 8, 24, 2, [128X[104X
    [4X[28X  8, 2, 2, 8, 2, 24, 8, 2, 56, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 2, 2, [128X[104X
    [4X[28X  24, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 24, 2, 2, 2, 8, 2, 8, 2, 2, 8, 2, 8, [128X[104X
    [4X[28X  2, 2, 2, 2, 8, 24, 2, 8, 2, 2, 8, 2, 24, 8, 2, 2, 2, 2, 8, 2, 8, 2, 2, [128X[104X
    [4X[28X  8, 2, 8, 2, 2, 2, 24, 2, 8, 2, 8, 2, 2, 8, 2, 8, 2, 24, 2, 2 ][128X[104X
    [4X[25Xgap>[125X [27XCollected(last);[127X[104X
    [4X[28X[ [ 2, 67 ], [ 8, 32 ], [ 16, 1 ], [ 24, 9 ], [ 40, 1 ], [ 56, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XLength(Difference([0..1000],Union(orbs)));[127X[104X
    [4X[28X491[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSo  almost  half  of  the  integers  in the range [10X[0..1000][110X lie in orbits of
  length larger than 100. In fact there are much larger orbits. For example:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XB := Ball(G,32,500,OnPoints:Spheres);; # compute ball about 32[127X[104X
    [4X[25Xgap>[125X [27XPosition(B,[]); # <> fail -> we have exhausted the orbit[127X[104X
    [4X[28X354[128X[104X
    [4X[25Xgap>[125X [27XSum(List(B,Length)); # the orbit length[127X[104X
    [4X[28X6296[128X[104X
    [4X[25Xgap>[125X [27XMaximum(Flat(B)); # the largest integer in the orbit[127X[104X
    [4X[28X3301636381609509797437679[128X[104X
    [4X[25Xgap>[125X [27XB := Ball(G,736,5000,OnPoints:Spheres);; # the same for 736 ...[127X[104X
    [4X[25Xgap>[125X [27XPosition(B,[]);[127X[104X
    [4X[28X2997[128X[104X
    [4X[25Xgap>[125X [27XSum(List(B,Length)); # the orbit length for this time[127X[104X
    [4X[28X495448[128X[104X
    [4X[25Xgap>[125X [27XMaximum(Flat(B));[127X[104X
    [4X[28X2461374276522713949036151811903149785690151467356354652860276957152301465\[128X[104X
    [4X[28X0546360696627187194849439881973442451686685024708652634593861146709752378\[128X[104X
    [4X[28X847078493406287854573381920553713155967741550498839[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIt  seems  that  the cycles of [22Xabc[122X completely traverse all orbits of [22XG[122X, with
  the  only  exception  of  the  orbit  of  0.  Let's  check this in the above
  examples:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xg := a*b*c;;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(g);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 60[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | n-1       if n in 3(30) U 9(30) U 17(30) U 23(30) U 27(30) U [128X[104X
    [4X[28X        |                   29(30)[128X[104X
    [4X[28X        | 3n/2      if n in 0(20) U 12(20) U 16(20)[128X[104X
    [4X[28X        | n+1       if n in 2(20) U 6(20) U 10(20)[128X[104X
    [4X[28X        | (2n+1)/3  if n in 7(30) U 13(30) U 19(30)[128X[104X
    [4X[28X        | n+3       if n in 1(30) U 11(30)[128X[104X
    [4X[28X n |-> <  n-5       if n in 15(30) U 25(30)[128X[104X
    [4X[28X        | (3n+12)/2 if n in 4(20)[128X[104X
    [4X[28X        | (3n-12)/2 if n in 8(20)[128X[104X
    [4X[28X        | n+5       if n in 14(20)[128X[104X
    [4X[28X        | n-3       if n in 18(20)[128X[104X
    [4X[28X        | (2n-7)/3  if n in 5(30)[128X[104X
    [4X[28X        | (2n+9)/3  if n in 21(30)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XLength(Cycle(g,32));[127X[104X
    [4X[28X6296[128X[104X
    [4X[25Xgap>[125X [27XLength(Cycle(g,736));[127X[104X
    [4X[28X495448[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YRepresentatives  and lengths of the cycles of [22Xg[122X which intersect nontrivially
  with the range [10X[0..1000][110X are as follows:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XCycleRepresentativesAndLengths(g,[0..1000]:notify:=50000);[127X[104X
    [4X[28Xn = 736: after 50000 steps, the iterate has 157 binary digits.[128X[104X
    [4X[28Xn = 736: after 100000 steps, the iterate has 135 binary digits.[128X[104X
    [4X[28Xn = 736: after 150000 steps, the iterate has 131 binary digits.[128X[104X
    [4X[28Xn = 736: after 200000 steps, the iterate has 507 binary digits.[128X[104X
    [4X[28Xn = 736: after 250000 steps, the iterate has 414 binary digits.[128X[104X
    [4X[28Xn = 736: after 300000 steps, the iterate has 457 binary digits.[128X[104X
    [4X[28Xn = 736: after 350000 steps, the iterate has 465 binary digits.[128X[104X
    [4X[28Xn = 736: after 400000 steps, the iterate has 325 binary digits.[128X[104X
    [4X[28Xn = 736: after 450000 steps, the iterate has 534 binary digits.[128X[104X
    [4X[28Xn = 896: after 50000 steps, the iterate has 359 binary digits.[128X[104X
    [4X[28Xn = 896: after 100000 steps, the iterate has 206 binary digits.[128X[104X
    [4X[28X[ [ 1, 15 ], [ 2, 2 ], [ 16, 24 ], [ 22, 2 ], [ 26, 2 ], [ 32, 6296 ], [128X[104X
    [4X[28X  [ 46, 2 ], [ 52, 8 ], [ 56, 296 ], [ 62, 2 ], [ 76, 8 ], [ 82, 2 ], [128X[104X
    [4X[28X  [ 86, 2 ], [ 92, 8 ], [ 106, 2 ], [ 112, 104 ], [ 116, 8 ], [128X[104X
    [4X[28X  [ 122, 2 ], [ 136, 440 ], [ 142, 2 ], [ 146, 2 ], [ 152, 40 ], [128X[104X
    [4X[28X  [ 166, 2 ], [ 172, 8 ], [ 176, 24 ], [ 182, 2 ], [ 196, 8 ], [128X[104X
    [4X[28X  [ 202, 2 ], [ 206, 2 ], [ 212, 8 ], [ 226, 2 ], [ 232, 24 ], [128X[104X
    [4X[28X  [ 236, 8 ], [ 242, 2 ], [ 256, 56 ], [ 262, 2 ], [ 266, 2 ], [128X[104X
    [4X[28X  [ 272, 408 ], [ 286, 2 ], [ 292, 8 ], [ 296, 104 ], [ 302, 2 ], [128X[104X
    [4X[28X  [ 316, 8 ], [ 322, 2 ], [ 326, 2 ], [ 332, 8 ], [ 346, 2 ], [128X[104X
    [4X[28X  [ 352, 264 ], [ 356, 8 ], [ 362, 2 ], [ 376, 1304 ], [ 382, 2 ], [128X[104X
    [4X[28X  [ 386, 2 ], [ 392, 24 ], [ 406, 2 ], [ 412, 8 ], [ 416, 200 ], [128X[104X
    [4X[28X  [ 422, 2 ], [ 436, 8 ], [ 442, 2 ], [ 446, 2 ], [ 452, 8 ], [128X[104X
    [4X[28X  [ 466, 2 ], [ 472, 104 ], [ 476, 8 ], [ 482, 2 ], [ 496, 24 ], [128X[104X
    [4X[28X  [ 502, 2 ], [ 506, 2 ], [ 512, 696 ], [ 526, 2 ], [ 532, 8 ], [128X[104X
    [4X[28X  [ 536, 3912 ], [ 542, 2 ], [ 556, 8 ], [ 562, 2 ], [ 566, 2 ], [128X[104X
    [4X[28X  [ 572, 8 ], [ 586, 2 ], [ 592, 888 ], [ 596, 8 ], [ 602, 2 ], [128X[104X
    [4X[28X  [ 616, 728 ], [ 622, 2 ], [ 626, 2 ], [ 632, 2776 ], [ 646, 2 ], [128X[104X
    [4X[28X  [ 652, 8 ], [ 656, 24 ], [ 662, 2 ], [ 676, 8 ], [ 682, 2 ], [128X[104X
    [4X[28X  [ 686, 2 ], [ 692, 8 ], [ 706, 2 ], [ 712, 24 ], [ 716, 8 ], [128X[104X
    [4X[28X  [ 722, 2 ], [ 736, 495448 ], [ 742, 2 ], [ 746, 2 ], [ 752, 1272 ], [128X[104X
    [4X[28X  [ 766, 2 ], [ 772, 8 ], [ 776, 376 ], [ 782, 2 ], [ 796, 8 ], [128X[104X
    [4X[28X  [ 802, 2 ], [ 806, 2 ], [ 812, 8 ], [ 826, 2 ], [ 832, 120 ], [128X[104X
    [4X[28X  [ 836, 8 ], [ 842, 2 ], [ 856, 2264 ], [ 862, 2 ], [ 866, 2 ], [128X[104X
    [4X[28X  [ 872, 24 ], [ 886, 2 ], [ 892, 8 ], [ 896, 132760 ], [ 902, 2 ], [128X[104X
    [4X[28X  [ 916, 8 ], [ 922, 2 ], [ 926, 2 ], [ 932, 8 ], [ 946, 2 ], [128X[104X
    [4X[28X  [ 952, 456 ], [ 956, 8 ], [ 962, 2 ], [ 976, 24 ], [ 982, 2 ], [128X[104X
    [4X[28X  [ 986, 2 ], [ 992, 1064 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSo  far  the  author has checked that all positive integers less than 173176
  lie  in finite cycles of [22Xg[122X. Several of them are longer than 1000000, and the
  cycle  containing  25952  has length 245719352. Whether the cycle containing
  173176  is  finite or infinite has not been checked so far -- in any case it
  is  longer than 5700000000, and it exceeds [22X10^40000[122X. Presumably it is finite
  as well, but checking this may require a lot of computing time.[133X
  
  [33X[0;0YOn  the one hand the cycles of [22Xg[122X seem to behave [21Xrandomly[121X, perhaps as if they
  would  ascend  or  descend  from  one  point to the next by a certain factor
  depending  on  which  side  a thrown coin falls on. -- In this [21Xmodel[121X, cycles
  would  be  finite  with  probability  1 since the simple random walk on ℤ is
  recurrent.  On  the  other,  there seems to be quite some structure on them,
  however little is known so far.[133X
  
  [33X[0;0YFirst  we  observe that each orbit under the action of [22XG[122X seems to split into
  two  cycles  of  [22Xh  :=  abcacb[122X  of  the same length (of course this has been
  checked for many more orbits than those shown here):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xh := a*b*c*a*c*b;[127X[104X
    [4X[28X<rcwa permutation of Z with modulus 360>[128X[104X
    [4X[25Xgap>[125X [27XList(CyclesOnFiniteOrbit(G,h,32),Length);[127X[104X
    [4X[28X[ 3148, 3148 ][128X[104X
    [4X[25Xgap>[125X [27XList(CyclesOnFiniteOrbit(G,h,736),Length);[127X[104X
    [4X[28X[ 247724, 247724 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YOne  cycle  seems  to  contain the points at the odd positions and the other
  seems to contain the points at the even positions in the cycle of [22Xg[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xcycle_g := Cycle(g,32);;[127X[104X
    [4X[25Xgap>[125X [27Xpositions1 := List(Cycle(h,32),n->Position(cycle_g,n));;[127X[104X
    [4X[25Xgap>[125X [27XCollected(positions1 mod 2);[127X[104X
    [4X[28X[ [ 1, 3148 ] ][128X[104X
    [4X[25Xgap>[125X [27Xpositions2 := List(Cycle(h,33),n->Position(cycle_g,n));;[127X[104X
    [4X[25Xgap>[125X [27XCollected(positions2 mod 2);[127X[104X
    [4X[28X[ [ 0, 3148 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YHowever  the  ordering  in  which  these  points  are traversed looks pretty
  [21Xscrambled[121X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xpositions1{[1..200]};[127X[104X
    [4X[28X[ 1, 6271, 6291, 6281, 6285, 6287, 6283, 6289, 6273, 6275, 6277, 6279, [128X[104X
    [4X[28X  6293, 5, 15, 17, 19, 6259, 6261, 6263, 6265, 21, 23, 25, 41, 6227, [128X[104X
    [4X[28X  6229, 6231, 6233, 6235, 6237, 6239, 43, 53, 55, 57, 63, 59, 61, 65, [128X[104X
    [4X[28X  45, 47, 49, 51, 67, 6223, 6221, 69, 6163, 6215, 6205, 6209, 6211, [128X[104X
    [4X[28X  6207, 6213, 6165, 6171, 6177, 6179, 6181, 6183, 6175, 6173, 6185, [128X[104X
    [4X[28X  6189, 6191, 6187, 6193, 6169, 6167, 6195, 6199, 6201, 6197, 6203, [128X[104X
    [4X[28X  6217, 73, 83, 85, 87, 103, 113, 115, 117, 4357, 4361, 4363, 4359, [128X[104X
    [4X[28X  4365, 4371, 4373, 4375, 4377, 4369, 4367, 4379, 119, 121, 123, 125, [128X[104X
    [4X[28X  129, 131, 127, 133, 139, 141, 143, 145, 137, 135, 147, 149, 151, 153, [128X[104X
    [4X[28X  155, 159, 161, 157, 163, 169, 175, 4283, 4281, 177, 4271, 4273, 4275, [128X[104X
    [4X[28X  4277, 181, 4255, 4257, 4259, 4261, 4263, 4265, 4267, 183, 2161, 2163, [128X[104X
    [4X[28X  4195, 4199, 4201, 4197, 4203, 4209, 4211, 4213, 4215, 4207, 4205, [128X[104X
    [4X[28X  4217, 2165, 2167, 2169, 2171, 2175, 2177, 2173, 2179, 2185, 2187, [128X[104X
    [4X[28X  2189, 2191, 2183, 2181, 2193, 2195, 2197, 2199, 2201, 2467, 2469, [128X[104X
    [4X[28X  4117, 4121, 4123, 4119, 4125, 4131, 4133, 4135, 4137, 4129, 4127, [128X[104X
    [4X[28X  4139, 2471, 2473, 2475, 2477, 2487, 2489, 2491, 2507, 2517, 2519, [128X[104X
    [4X[28X  2521, 2537, 3923, 3925, 3941, 3943 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X7.5 [33X[0;0YA group which acts 4-transitively on the positive integers[133X[101X
  
  [33X[0;0YIn this section, we would like to show that the group [22XG[122X generated by the two
  permutations[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := RcwaMapping([[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);;[127X[104X
    [4X[25Xgap>[125X [27Xu := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;[127X[104X
    [4X[25Xgap>[125X [27XSetName(a,"a"); SetName(u,"u"); G := Group(a,u);;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ywhich  we  have already investigated in earlier examples acts 4-transitively
  on  the  set of positive integers. Obviously, it acts on the set of positive
  integers. First we show that this action is transitive. We start by checking
  in  which residue classes sufficiently large positive integers are mapped to
  smaller ones by a suitable group element:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList([a,a^-1,u,u^-1],DecreasingOn);[127X[104X
    [4X[28X[ 1(2), 0(3), 0(5) U 2(5), 2(3) ][128X[104X
    [4X[25Xgap>[125X [27XUnion(last);[127X[104X
    [4X[28XZ \ 4(30) U 16(30) U 28(30)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  see  that  we  cannot always choose such a group element from the set of
  generators and their inverses -- otherwise the union would be [10XIntegers[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2],DecreasingOn);[127X[104X
    [4X[28X[ 1(2), 0(3), 0(5) U 2(5), 2(3), 1(8) U 7(8), 0(3) U 2(9) U 7(9), [128X[104X
    [4X[28X  0(25) U 12(25) U 17(25) U 20(25), 2(3) U 1(9) U 3(9) ][128X[104X
    [4X[25Xgap>[125X [27XUnion(last); # Still not enough ...[127X[104X
    [4X[28XZ \ 4(90) U 58(90) U 76(90)[128X[104X
    [4X[25Xgap>[125X [27XList([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2,a*u,u*a,(a*u)^-1,(u*a)^-1],[127X[104X
    [4X[25X>[125X [27X        DecreasingOn);[127X[104X
    [4X[28X[ 1(2), 0(3), 0(5) U 2(5), 2(3), 1(8) U 7(8), 0(3) U 2(9) U 7(9), [128X[104X
    [4X[28X  0(25) U 12(25) U 17(25) U 20(25), 2(3) U 1(9) U 3(9), [128X[104X
    [4X[28X  3(5) U 0(10) U 7(20) U 9(20), 0(5) U 2(5), 2(3), 3(9) U 4(9) U 8(9) ][128X[104X
    [4X[25Xgap>[125X [27XUnion(last); # ... but that's it![127X[104X
    [4X[28XIntegers[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFinally,  we  have  to deal with [21Xsmall[121X integers. We use the notation for the
  coefficients  of  rcwa  mappings introduced at the beginning of this manual.
  Let  [22Xc_r(m)  >  a_r(m)[122X.  Then we easily see that [22X(a_r(m)n+b_r(m))/c_r(m) > n[122X
  implies  [22Xn < b_r(m)/(c_r(m)-a_r(m))[122X. Thus we can restrict our considerations
  to  integers  [22Xn  <  b_  max[122X,  where  [22Xb_ max[122X is the largest second entry of a
  coefficient triple of one of the group elements in our list:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList([a,a^-1,u,u^-1,a^2,a^-2,u^2,u^-2,a*u,u*a,(a*u)^-1,(u*a)^-1],[127X[104X
    [4X[25X>[125X [27X        f->Maximum(List(Coefficients(f),c->c[2])));[127X[104X
    [4X[28X[ 1, 1, 4, 2, 7, 7, 56, 28, 25, 17, 17, 11 ][128X[104X
    [4X[25Xgap>[125X [27XMaximum(last);[127X[104X
    [4X[28X56[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThus  this  upper  bound  is 56. The rest is easy -- all we have to do is to
  check  that the orbit containing 1 contains also all other positive integers
  less than or equal to 56:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS := [1];;[127X[104X
    [4X[25Xgap>[125X [27Xwhile not IsSubset(S,[1..56]) do[127X[104X
    [4X[25X>[125X [27X     S := Union(S,S^a,S^u,S^(a^-1),S^(u^-1));[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27XIsSubset(S,[1..56]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YChecking 2-transitivity is computationally harder, and in the sequel we will
  omit  some  steps  which  are in practice needed to find out [21Xwhat to do[121X. The
  approach  taken  here  is  to  show  that  the  stabilizer  of 1  in [22XG[122X  acts
  transitively  on  the set of positive integers greater than 1. We do this by
  similar  means as used above for showing the transitivity of the action of [22XG[122X
  on  the positive integers. We start by determining all products of at most 5
  generators and their inverses, which stabilize 1 (taking at most 4-generator
  products would not suffice!):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xgens := [a,u,a^-1,u^-1];;[127X[104X
    [4X[25Xgap>[125X [27Xtups := Concatenation(List([1..5],k->Tuples([1..4],k)));;[127X[104X
    [4X[25Xgap>[125X [27XLength(tups);[127X[104X
    [4X[28X1364[128X[104X
    [4X[25Xgap>[125X [27Xtups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],[127X[104X
    [4X[25X>[125X [27X                                     l->PositionSublist(tup,l)=fail));;[127X[104X
    [4X[25Xgap>[125X [27XLength(tups);[127X[104X
    [4X[28X484[128X[104X
    [4X[25Xgap>[125X [27Xstab := [];;[127X[104X
    [4X[25Xgap>[125X [27Xfor tup in tups do[127X[104X
    [4X[25X>[125X [27X     n := 1;[127X[104X
    [4X[25X>[125X [27X     for i in tup do n := n^gens[i]; od;[127X[104X
    [4X[25X>[125X [27X     if n = 1 then Add(stab,tup); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27XLength(stab);[127X[104X
    [4X[28X118[128X[104X
    [4X[25Xgap>[125X [27Xstabelm := List(stab,tup->Product(List(tup,i->gens[i])));;[127X[104X
    [4X[25Xgap>[125X [27XForAll(stabelm,elm->1^elm=1); # Check.[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe resulting products have various different not quite small moduli:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList(stabelm,Modulus);[127X[104X
    [4X[28X[ 4, 3, 16, 25, 9, 81, 64, 100, 108, 100, 25, 75, 27, 243, 324, 243, [128X[104X
    [4X[28X  256, 400, 144, 400, 100, 432, 324, 400, 80, 400, 625, 25, 75, 135, [128X[104X
    [4X[28X  150, 75, 225, 81, 729, 486, 729, 144, 144, 81, 729, 1296, 729, 6561, [128X[104X
    [4X[28X  1024, 1600, 192, 1600, 400, 576, 432, 1600, 320, 1600, 2500, 100, 100, [128X[104X
    [4X[28X  180, 192, 192, 108, 972, 1728, 972, 8748, 1600, 400, 320, 80, 1600, [128X[104X
    [4X[28X  2500, 300, 2500, 625, 625, 75, 675, 75, 75, 135, 405, 600, 120, 600, [128X[104X
    [4X[28X  1875, 75, 225, 405, 225, 225, 675, 243, 2187, 729, 2187, 216, 216, [128X[104X
    [4X[28X  243, 2187, 1944, 2187, 19683, 576, 144, 576, 432, 81, 81, 729, 2187, [128X[104X
    [4X[28X  5184, 324, 8748, 243, 2187, 19683, 26244, 19683 ][128X[104X
    [4X[25Xgap>[125X [27XLcm(last);[127X[104X
    [4X[28X12597120000[128X[104X
    [4X[25Xgap>[125X [27XCollected(Factors(last));[127X[104X
    [4X[28X[ [ 2, 10 ], [ 3, 9 ], [ 5, 4 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSimilar  as  before,  we determine for any of the above mappings the residue
  classes  whose  elements larger than the largest [22Xb_r(m)[122X - coefficient of the
  respective mapping are mapped to smaller integers:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xdecs := List(stabelm,DecreasingOn);;[127X[104X
    [4X[25Xgap>[125X [27XList(decs,Modulus);[127X[104X
    [4X[28X[ 2, 3, 8, 25, 9, 9, 16, 100, 12, 50, 25, 75, 27, 81, 54, 81, 64, 400, [128X[104X
    [4X[28X  48, 200, 100, 72, 108, 400, 80, 200, 625, 25, 75, 45, 75, 75, 225, 81, [128X[104X
    [4X[28X  243, 81, 243, 144, 144, 81, 243, 216, 243, 243, 128, 1600, 64, 400, [128X[104X
    [4X[28X  400, 48, 144, 1600, 320, 400, 2500, 100, 100, 60, 96, 192, 108, 324, [128X[104X
    [4X[28X  144, 324, 972, 400, 400, 80, 80, 400, 2500, 100, 1250, 625, 625, 25, [128X[104X
    [4X[28X  75, 75, 75, 45, 135, 600, 120, 150, 1875, 75, 225, 135, 225, 225, 675, [128X[104X
    [4X[28X  243, 729, 243, 729, 108, 216, 243, 729, 162, 729, 2187, 144, 144, 144, [128X[104X
    [4X[28X  144, 81, 81, 243, 729, 1296, 324, 972, 243, 729, 2187, 1458, 2187 ][128X[104X
    [4X[25Xgap>[125X [27XLcm(last);[127X[104X
    [4X[28X174960000[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSince  the  least  common  multiple of the moduli of these unions of residue
  classes  is as large as 174960000, directly forming their union and checking
  whether  it  is equal to the set of integers would take relatively much time
  and  memory.  However, starting with the set of integers and subtracting the
  above sets one-by-one in a suitably chosen order is cheap:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSortParallel(decs,stabelm,[127X[104X
    [4X[25X>[125X [27X     function(S1,S2)[127X[104X
    [4X[25X>[125X [27X       return First([1..100],k->Factorial(k) mod Modulus(S1)=0)[127X[104X
    [4X[25X>[125X [27X            < First([1..100],k->Factorial(k) mod Modulus(S2)=0);[127X[104X
    [4X[25X>[125X [27X     end);[127X[104X
    [4X[25Xgap>[125X [27XS := Integers;;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..Length(decs)] do[127X[104X
    [4X[25X>[125X [27X     S_old := S; S := Difference(S,decs[i]);[127X[104X
    [4X[25X>[125X [27X     if S <> S_old then ViewObj(S); Print("\n"); fi;[127X[104X
    [4X[25X>[125X [27X     if S = [] then maxind := i; break; fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[28X0(2)[128X[104X
    [4X[28X2(6) U 4(6)[128X[104X
    [4X[28X<union of 8 residue classes (mod 30)>[128X[104X
    [4X[28X<union of 19 residue classes (mod 90) (9 classes)>[128X[104X
    [4X[28X<union of 114 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 99 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 57 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 54 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 41 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 35 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 8 residue classes (mod 720) (6 classes)>[128X[104X
    [4X[28X4(720) U 94(720) U 148(720) U 238(720)[128X[104X
    [4X[28X<union of 24 residue classes (mod 5760)>[128X[104X
    [4X[28X<union of 72 residue classes (mod 51840)>[128X[104X
    [4X[28X<union of 48 residue classes (mod 51840)>[128X[104X
    [4X[28X<union of 192 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 168 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 120 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 96 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 72 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 60 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 48 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 24 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 12 residue classes (mod 259200) (6 classes)>[128X[104X
    [4X[28X<union of 24 residue classes (mod 777600)>[128X[104X
    [4X[28X<union of 12 residue classes (mod 777600) (6 classes)>[128X[104X
    [4X[28X111604(194400) U 14404(777600) U 208804(777600)[128X[104X
    [4X[28X[  ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSimilar as above, it remains to check that the [21Xsmall[121X integers all lie in the
  orbit  containing 2.  Obviously,  it is sufficient to check that any integer
  greater than 2 is mapped to a smaller one by some suitably chosen element of
  the stabilizer under consideration:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XMaximum(List(stabelm{[1..maxind]},[127X[104X
    [4X[25X>[125X [27X                f->Maximum(List(Coefficients(f),c->c[2]))));[127X[104X
    [4X[28X6581[128X[104X
    [4X[25Xgap>[125X [27XFiltered([3..6581],n->Minimum(List(stabelm,elm->n^elm))>=n);[127X[104X
    [4X[28X[ 4 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe have to treat 4 separately:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27X1^(u*a*u^2*a^-1*u);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27X4^(u*a*u^2*a^-1*u);[127X[104X
    [4X[28X3[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNow  we know that any positive integer greater than 1 lies in the same orbit
  under the action of the stabilizer of 1 in [22XG[122X as 2, thus that this stabilizer
  acts  transitively  on  [22Xℕ ∖ {1}[122X. But this means that we have established the
  2-transitivity of the action of [22XG[122X on ℕ.[133X
  
  [33X[0;0YIn  the  following,  we essentially repeat the above steps to show that this
  action is indeed 3-transitive:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xtups := Concatenation(List([1..6],k->Tuples([1..4],k)));;[127X[104X
    [4X[25Xgap>[125X [27Xtups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],[127X[104X
    [4X[25X>[125X [27X                                     l->PositionSublist(tup,l)=fail));;[127X[104X
    [4X[25Xgap>[125X [27Xstab := [];;[127X[104X
    [4X[25Xgap>[125X [27Xfor tup in tups do[127X[104X
    [4X[25X>[125X [27X     l := [1,2];[127X[104X
    [4X[25X>[125X [27X     for i in tup do l := List(l,n->n^gens[i]); od;[127X[104X
    [4X[25X>[125X [27X     if l = [1,2] then Add(stab,tup); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27XLength(stab);[127X[104X
    [4X[28X212[128X[104X
    [4X[25Xgap>[125X [27Xstabelm := List(stab,tup->Product(List(tup,i->gens[i])));;[127X[104X
    [4X[25Xgap>[125X [27Xdecs := List(stabelm,DecreasingOn);;[127X[104X
    [4X[25Xgap>[125X [27XSortParallel(decs,stabelm,function(S1,S2)[127X[104X
    [4X[25X>[125X [27X     return First([1..100],k->Factorial(k) mod Mod(S1)=0)[127X[104X
    [4X[25X>[125X [27X          < First([1..100],k->Factorial(k) mod Mod(S2)=0); end);[127X[104X
    [4X[25Xgap>[125X [27XS := Integers;;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..Length(decs)] do[127X[104X
    [4X[25X>[125X [27X     S_old := S; S := Difference(S,decs[i]);[127X[104X
    [4X[25X>[125X [27X     if S <> S_old then ViewObj(S); Print("\n"); fi;[127X[104X
    [4X[25X>[125X [27X     if S = [] then break; fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[28XZ \ 1(8) U 7(8)[128X[104X
    [4X[28X<union of 151 residue classes (mod 240)>[128X[104X
    [4X[28X<union of 208 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 51 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 45 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 39 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 33 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 23 residue classes (mod 720)>[128X[104X
    [4X[28X<union of 19 residue classes (mod 720) (7 classes)>[128X[104X
    [4X[28X<union of 17 residue classes (mod 720) (6 classes)>[128X[104X
    [4X[28X<union of 16 residue classes (mod 720) (7 classes)>[128X[104X
    [4X[28X<union of 14 residue classes (mod 720) (9 classes)>[128X[104X
    [4X[28X<union of 8 residue classes (mod 720) (6 classes)>[128X[104X
    [4X[28X<union of 7 residue classes (mod 720) (6 classes)>[128X[104X
    [4X[28X238(360) U 4(720) U 148(720) U 454(720)[128X[104X
    [4X[28X<union of 38 residue classes (mod 5760)>[128X[104X
    [4X[28X<union of 37 residue classes (mod 5760)>[128X[104X
    [4X[28X<union of 25 residue classes (mod 5760)>[128X[104X
    [4X[28X<union of 21 residue classes (mod 5760)>[128X[104X
    [4X[28X<union of 17 residue classes (mod 5760) (13 classes)>[128X[104X
    [4X[28X<union of 16 residue classes (mod 5760) (12 classes)>[128X[104X
    [4X[28X<union of 138 residue classes (mod 51840)>[128X[104X
    [4X[28X<union of 48 residue classes (mod 51840)>[128X[104X
    [4X[28X<union of 32 residue classes (mod 51840)>[128X[104X
    [4X[28X<union of 20 residue classes (mod 51840) (14 classes)>[128X[104X
    [4X[28X<union of 16 residue classes (mod 51840) (12 classes)>[128X[104X
    [4X[28X<union of 68 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 42 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 32 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 26 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 25 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 11 residue classes (mod 259200) (10 classes)>[128X[104X
    [4X[28X<union of 10 residue classes (mod 259200) (9 classes)>[128X[104X
    [4X[28X<union of 7 residue classes (mod 259200) (6 classes)>[128X[104X
    [4X[28X13414(129600) U 2164(259200) U 66964(259200) U 228964(259200)[128X[104X
    [4X[28X2164(259200) U 66964(259200) U 228964(259200)[128X[104X
    [4X[28X[  ][128X[104X
    [4X[25Xgap>[125X [27XMaximum(List(stabelm,f->Maximum(List(Coefficients(f),c->c[2]))));[127X[104X
    [4X[28X515816[128X[104X
    [4X[25Xgap>[125X [27Xsmallnum := [4..515816];;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..Length(stabelm)] do[127X[104X
    [4X[25X>[125X [27X     smallnum := Filtered(smallnum,n->n^stabelm[i]>=n);[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27Xsmallnum;[127X[104X
    [4X[28X[  ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe same for 4-transitivity:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xtups := Concatenation(List([1..8],k->Tuples([1..4],k)));;[127X[104X
    [4X[25Xgap>[125X [27Xtups := Filtered(tups,tup->ForAll([[1,3],[3,1],[2,4],[4,2]],[127X[104X
    [4X[25X>[125X [27X                                     l->PositionSublist(tup,l)=fail));;[127X[104X
    [4X[25Xgap>[125X [27Xstab := [];;[127X[104X
    [4X[25Xgap>[125X [27Xfor tup in tups do[127X[104X
    [4X[25X>[125X [27X     l := [1,2,3];[127X[104X
    [4X[25X>[125X [27X     for i in tup do l := List(l,n->n^gens[i]); od;[127X[104X
    [4X[25X>[125X [27X     if l = [1,2,3] then Add(stab,tup); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27XLength(stab);[127X[104X
    [4X[28X528[128X[104X
    [4X[25Xgap>[125X [27Xstabelm := [];;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..Length(stab)] do[127X[104X
    [4X[25X>[125X [27X     elm := One(G);[127X[104X
    [4X[25X>[125X [27X     for j in stab[i] do[127X[104X
    [4X[25X>[125X [27X       if Modulus(elm) > 10000 then elm := fail; break; fi;[127X[104X
    [4X[25X>[125X [27X       elm := elm * gens[j];[127X[104X
    [4X[25X>[125X [27X     od;[127X[104X
    [4X[25X>[125X [27X     if elm <> fail then Add(stabelm,elm); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27XLength(stabelm);[127X[104X
    [4X[28X334[128X[104X
    [4X[25Xgap>[125X [27Xdecs := List(stabelm,DecreasingOn);;[127X[104X
    [4X[25Xgap>[125X [27XSortParallel(decs,stabelm,[127X[104X
    [4X[25X>[125X [27X     function(S1,S2)[127X[104X
    [4X[25X>[125X [27X       return First([1..100],k->Factorial(k) mod Modulus(S1) = 0)[127X[104X
    [4X[25X>[125X [27X            < First([1..100],k->Factorial(k) mod Modulus(S2) = 0);[127X[104X
    [4X[25X>[125X [27X     end);[127X[104X
    [4X[25Xgap>[125X [27XS := Integers;;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..Length(decs)] do[127X[104X
    [4X[25X>[125X [27X     S_old := S; S := Difference(S,decs[i]);[127X[104X
    [4X[25X>[125X [27X     if S <> S_old then ViewObj(S); Print("\n"); fi;[127X[104X
    [4X[25X>[125X [27X     if S = [] then maxind := i; break; fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[28XZ \ 1(8) U 7(8)[128X[104X
    [4X[28X<union of 46 residue classes (mod 72)>[128X[104X
    [4X[28X<union of 20 residue classes (mod 72) (8 classes)>[128X[104X
    [4X[28X4(18)[128X[104X
    [4X[28X<union of 28 residue classes (mod 576)>[128X[104X
    [4X[28X<union of 22 residue classes (mod 576)>[128X[104X
    [4X[28X<union of 21 residue classes (mod 576)>[128X[104X
    [4X[28X40(72) U 4(144) U 94(144) U 346(576) U 418(576)[128X[104X
    [4X[28X<union of 16 residue classes (mod 576) (6 classes)>[128X[104X
    [4X[28X<union of 15 residue classes (mod 576) (6 classes)>[128X[104X
    [4X[28X4(144) U 94(144) U 346(576) U 418(576)[128X[104X
    [4X[28X<union of 30 residue classes (mod 5184)>[128X[104X
    [4X[28X<union of 26 residue classes (mod 5184)>[128X[104X
    [4X[28X<union of 6 residue classes (mod 1296)>[128X[104X
    [4X[28X<union of 504 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 324 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 282 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 239 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 218 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 194 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 154 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 97 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 85 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 77 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 67 residue classes (mod 129600)>[128X[104X
    [4X[28X<union of 125 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 108 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 107 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 101 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 100 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 84 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 80 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 76 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 70 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 66 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 54 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 53 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 47 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 43 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 31 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 24 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 23 residue classes (mod 259200)>[128X[104X
    [4X[28X<union of 13 residue classes (mod 259200) (8 classes)>[128X[104X
    [4X[28X57406(129600) U 115006(129600) U 192676(259200) U 250276(259200)[128X[104X
    [4X[28X57406(129600) U 192676(259200) U 250276(259200) U 374206(388800)[128X[104X
    [4X[28X57406(129600) U 192676(259200) U 250276(259200)[128X[104X
    [4X[28X250276(259200) U 57406(388800) U 316606(388800) U 451876(777600)[128X[104X
    [4X[28X316606(388800) U 451876(777600) U 509476(777600) U 768676(777600)[128X[104X
    [4X[28X<union of 18 residue classes (mod 3110400) (6 classes)>[128X[104X
    [4X[28X451876(777600) U 509476(777600) U 705406(777600) U 768676(777600)[128X[104X
    [4X[28X U 2649406(3110400)[128X[104X
    [4X[28X451876(777600) U 705406(777600) U 768676(777600) U 2649406(3110400)[128X[104X
    [4X[28X451876(777600) U 705406(777600) U 2649406(3110400)[128X[104X
    [4X[28X705406(777600) U 2007076(3110400) U 2649406(3110400) U 2784676(3110400)[128X[104X
    [4X[28X<union of 14 residue classes (mod 9331200) (8 classes)>[128X[104X
    [4X[28X2260606(2332800) U 5759806(9331200) U 5895076(9331200) U 8227876(9331200)[128X[104X
    [4X[28X4593406(6998400) U 15091006(27993600) U 17559076(27993600)[128X[104X
    [4X[28X U 24557476(27993600)[128X[104X
    [4X[28X<union of 14 residue classes (mod 83980800) (8 classes)>[128X[104X
    [4X[28X18590206(20995200) U 24557476(83980800) U 45552676(83980800)[128X[104X
    [4X[28X U 71078206(83980800)[128X[104X
    [4X[28X[  ][128X[104X
    [4X[25Xgap>[125X [27XMaximum(List(stabelm{[1..maxind]},[127X[104X
    [4X[25X>[125X [27X                f->Maximum(List(Coefficients(f),c->c[2]))));[127X[104X
    [4X[28X58975[128X[104X
    [4X[25Xgap>[125X [27Xsmallnum := [5..58975];;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..maxind] do[127X[104X
    [4X[25X>[125X [27X     smallnum := Filtered(smallnum,n->n^stabelm[i]>=n);[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27Xsmallnum;[127X[104X
    [4X[28X[  ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThere is even some evidence that the degree of transitivity of the action of
  [22XG[122X on the positive integers is higher than 4:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xphi := EpimorphismFromFreeGroup(G);[127X[104X
    [4X[28X[ a, u ] -> [ a, u ][128X[104X
    [4X[25Xgap>[125X [27XF := Source(phi);[127X[104X
    [4X[28X<free group on the generators [ a, u ]>[128X[104X
    [4X[25Xgap>[125X [27XList([5..20],[127X[104X
    [4X[25X>[125X [27X        n->RepresentativeActionPreImage(G,[1,2,3,4,5],[127X[104X
    [4X[25X>[125X [27X                                          [1,2,3,4,n],OnTuples,F));[127X[104X
    [4X[28X[ <identity ...>, a^-3*u^4*a*u^-2*a^2, a^-1*(a^-1*u)^4*a^-1*u^-1*a, [128X[104X
    [4X[28X  a^4*u^-2*a^-4, a^-1*u^-4*a, (u^2*a^-1)^2*u^-2, u^-2*a^-2*u^4, [128X[104X
    [4X[28X  a^-1*u^2*a, a^-1*u^-6*a, a^2*u^4*a^2*u^2, u^-4*a*u^-2*a^-3, [128X[104X
    [4X[28X  a^-1*u^-2*a^-3*u^4*a^2, a^2*(a*u^2)^2, (a*u^-4)^2*a^-2, [128X[104X
    [4X[28X  u^-2*a*u^2*a*u^-2, u^-4*a^2*u^2 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter [10XAssignGlobals(LoadRCWAExamples().CollatzlikePerms);[110X in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.6 [33X[0;0YA group which acts 3-transitively, but not 4-transitively on ℤ[133X[101X
  
  [33X[0;0YIn this section, we would like to show that the group [22XG[122X generated by the two
  permutations  [22Xn  ↦  n  +  1[122X  and  [22Xτ_1(2),0(4)[122X  acts  3-transitively, but not
  4-transitively on the set of integers.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := Group(ClassShift(0,1),ClassTransposition(1,2,0,4));[127X[104X
    [4X[28X<rcwa group over Z with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsTame(G);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27X(G.1^-2*G.2)^3*(G.1^2*G.2)^3; # G <> the free product C_infty * C_2.[127X[104X
    [4X[28XIdentityMapping( Integers )[128X[104X
    [4X[25Xgap>[125X [27XDisplay(G:CycleNotation:=false);[127X[104X
    [4X[28X[128X[104X
    [4X[28XWild rcwa group over Z, generated by[128X[104X
    [4X[28X[128X[104X
    [4X[28X[[128X[104X
    [4X[28XTame rcwa permutation of Z: n -> n + 1[128X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 4, of order 2[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 2n-2    if n in 1(2)[128X[104X
    [4X[28X n |-> <  (n+2)/2 if n in 0(4)[128X[104X
    [4X[28X        | n       if n in 2(4)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[28X][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThis  group acts transitively on ℤ, since already the cyclic group generated
  by  the  first  of  the two generators does so. Next we have to show that it
  acts  2-transitively.  We  essentially  proceed  as  in  the  example in the
  previous  section, by checking that the stabilizer of 0 acts transitively on
  [22Xℤ ∖ {0}[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xgens := [ClassShift(0,1)^-1,ClassTransposition(1,2,0,4),[127X[104X
    [4X[25X>[125X [27X            ClassShift(0,1)];;[127X[104X
    [4X[25Xgap>[125X [27Xtups := Concatenation(List([1..6],k->Tuples([-1,0,1],k)));;[127X[104X
    [4X[25Xgap>[125X [27Xtups := Filtered(tups,tup->ForAll([[0,0],[-1,1],[1,-1]],[127X[104X
    [4X[25X>[125X [27X                                     l->PositionSublist(tup,l)=fail));;[127X[104X
    [4X[25Xgap>[125X [27XLength(tups);[127X[104X
    [4X[28X189[128X[104X
    [4X[25Xgap>[125X [27Xstab := [];;[127X[104X
    [4X[25Xgap>[125X [27Xfor tup in tups do[127X[104X
    [4X[25X>[125X [27X     n := 0;[127X[104X
    [4X[25X>[125X [27X     for i in tup do n := n^gens[i+2]; od;[127X[104X
    [4X[25X>[125X [27X     if n = 0 then Add(stab,tup); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27Xstabelm := List(stab,tup->Product(List(tup,i->gens[i+2])));;[127X[104X
    [4X[25Xgap>[125X [27XCollected(List(stabelm,Modulus));[127X[104X
    [4X[28X[ [ 4, 6 ], [ 8, 4 ], [ 16, 3 ] ][128X[104X
    [4X[25Xgap>[125X [27Xdecs := List(stabelm,DecreasingOn);[127X[104X
    [4X[28X[ 0(4), 3(4), 0(4), 3(4), 2(4), 0(4), 4(8), 2(4), 2(4), 0(4), 1(4), [128X[104X
    [4X[28X  0(8), 3(8) ][128X[104X
    [4X[25Xgap>[125X [27XUnion(decs);[127X[104X
    [4X[28XIntegers[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YSimilar  as  in  the previous section, it remains to check that the integers
  with [21Xsmall[121X absolute value all lie in the orbit containing 1 under the action
  of the stabilizer of 0:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XMaximum(List(stabelm,f->Maximum(List(Coefficients(f),[127X[104X
    [4X[25X>[125X [27X                                        c->AbsInt(c[2])))));[127X[104X
    [4X[28X21[128X[104X
    [4X[25Xgap>[125X [27XS := [1];;[127X[104X
    [4X[25Xgap>[125X [27Xfor elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;[127X[104X
    [4X[25Xgap>[125X [27XIsSubset(S,Difference([-21..21],[0])); # Not yet ..[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xfor elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;[127X[104X
    [4X[25Xgap>[125X [27XIsSubset(S,Difference([-21..21],[0])); # ... but now![127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNow  we  have  to  check  for 3-transitivity. Since we cannot find for every
  residue class an element of the pointwise stabilizer of [22X{0,1}[122X which properly
  divides  its  elements, we also have to take additions and subtractions into
  consideration.  Since the moduli of all of our stabilizer elements are quite
  small, simply looking at sets of representatives is cheap:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xtups := Concatenation(List([1..10],k->Tuples([-1,0,1],k)));;[127X[104X
    [4X[25Xgap>[125X [27Xtups := Filtered(tups,tup->ForAll([[0,0],[-1,1],[1,-1]],[127X[104X
    [4X[25X>[125X [27X                                     l->PositionSublist(tup,l)=fail));;[127X[104X
    [4X[25Xgap>[125X [27XLength(tups);[127X[104X
    [4X[28X3069[128X[104X
    [4X[25Xgap>[125X [27Xstab := [];;[127X[104X
    [4X[25Xgap>[125X [27Xfor tup in tups do[127X[104X
    [4X[25X>[125X [27X     l := [0,1];[127X[104X
    [4X[25X>[125X [27X     for i in tup do l := List(l,n->n^gens[i+2]); od;[127X[104X
    [4X[25X>[125X [27X     if l = [0,1] then Add(stab,tup); fi;[127X[104X
    [4X[25X>[125X [27X   od;[127X[104X
    [4X[25Xgap>[125X [27XLength(stab);[127X[104X
    [4X[28X10[128X[104X
    [4X[25Xgap>[125X [27Xstabelm := List(stab,tup->Product(List(tup,i->gens[i+2])));;[127X[104X
    [4X[25Xgap>[125X [27XMaximum(List(stabelm,Modulus));[127X[104X
    [4X[28X8[128X[104X
    [4X[25Xgap>[125X [27XMaximum(List(stabelm,[127X[104X
    [4X[25X>[125X [27X                f->Maximum(List(Coefficients(f),c->AbsInt(c[2])))));[127X[104X
    [4X[28X8[128X[104X
    [4X[25Xgap>[125X [27Xdecsp := List(stabelm,elm->Filtered([9..16],n->n^elm<n));[127X[104X
    [4X[28X[ [ 9, 13 ], [ 10, 12, 14, 16 ], [ 12, 16 ], [ 9, 13 ], [ 12, 16 ], [128X[104X
    [4X[28X  [ 9, 11, 13, 15 ], [ 9, 11, 13, 15 ], [ 12, 16 ], [ 12, 16 ], [128X[104X
    [4X[28X  [ 9, 11, 13, 15 ] ][128X[104X
    [4X[25Xgap>[125X [27XUnion(decsp);[127X[104X
    [4X[28X[ 9, 10, 11, 12, 13, 14, 15, 16 ][128X[104X
    [4X[25Xgap>[125X [27Xdecsm := List(stabelm,elm->Filtered([-16..-9],n->n^elm>n));[127X[104X
    [4X[28X[ [ -15, -13, -11, -9 ], [ -16, -12 ], [ -16, -12 ], [ -15, -11 ], [128X[104X
    [4X[28X  [ -16, -14, -12, -10 ], [ -15, -11 ], [ -15, -11 ], [128X[104X
    [4X[28X  [ -16, -14, -12, -10 ], [ -16, -14, -12, -10 ], [ -15, -11 ] ][128X[104X
    [4X[25Xgap>[125X [27XUnion(decsm);[127X[104X
    [4X[28X[ -16, -15, -14, -13, -12, -11, -10, -9 ][128X[104X
    [4X[25Xgap>[125X [27XS := [2];;[127X[104X
    [4X[25Xgap>[125X [27Xfor elm in stabelm do S := Union(S,S^elm,S^(elm^-1)); od;[127X[104X
    [4X[25Xgap>[125X [27XIsSubset(S,Difference([-8..8],[0,1]));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YAt  this  point we have established 3-transitivity. It remains to check that
  the  group  [22XG[122X does not act 4-transitively. We do this by checking that it is
  not  transitive on 4-tuples (mod 4). Since [22Xn[122X mod 8 determines the image of [22Xn[122X
  under a generator of [22XG[122X (mod 4), it suffices to compute (mod 8):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xorb := [[0,1,2,3]];;[127X[104X
    [4X[25Xgap>[125X [27Xextend := function ()[127X[104X
    [4X[25X>[125X [27X     local gen;[127X[104X
    [4X[25X>[125X [27X     for gen in gens do[127X[104X
    [4X[25X>[125X [27X       orb := Union(orb,List(orb,l->List(l,n->n^gen) mod 8));[127X[104X
    [4X[25X>[125X [27X     od;[127X[104X
    [4X[25X>[125X [27X   end;;[127X[104X
    [4X[25Xgap>[125X [27Xrepeat[127X[104X
    [4X[25X>[125X [27X     old := ShallowCopy(orb);[127X[104X
    [4X[25X>[125X [27X     extend(); Print(Length(orb),"\n");[127X[104X
    [4X[25X>[125X [27X   until orb = old;[127X[104X
    [4X[28X7[128X[104X
    [4X[28X27[128X[104X
    [4X[28X97[128X[104X
    [4X[28X279[128X[104X
    [4X[28X573[128X[104X
    [4X[28X916[128X[104X
    [4X[28X1185[128X[104X
    [4X[28X1313[128X[104X
    [4X[28X1341[128X[104X
    [4X[28X1344[128X[104X
    [4X[28X1344[128X[104X
    [4X[25Xgap>[125X [27XLength(Set(List(orb,l->l mod 4)));[127X[104X
    [4X[28X120[128X[104X
    [4X[25Xgap>[125X [27Xlast < 4^4;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThis   shows   that  [22XG[122X  acts  not  4-transitively  on ℤ.  The  corresponding
  calculation for 3-tuples looks as follows:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xorb := [[0,1,2]];;[127X[104X
    [4X[25Xgap>[125X [27Xrepeat[127X[104X
    [4X[25X>[125X [27X     old := ShallowCopy(orb);[127X[104X
    [4X[25X>[125X [27X     extend(); Print(Length(orb),"\n");[127X[104X
    [4X[25X>[125X [27X   until orb = old;[127X[104X
    [4X[28X7[128X[104X
    [4X[28X27[128X[104X
    [4X[28X84[128X[104X
    [4X[28X207[128X[104X
    [4X[28X363[128X[104X
    [4X[28X459[128X[104X
    [4X[28X503[128X[104X
    [4X[28X512[128X[104X
    [4X[28X512[128X[104X
    [4X[25Xgap>[125X [27XLength(Set(List(orb,l->l mod 4)));[127X[104X
    [4X[28X64[128X[104X
    [4X[25Xgap>[125X [27Xlast = 4^3;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNeedless  to  say  that the latter kind of argumentation is not suitable for
  proving, but only for disproving [22Xk[122X-transitivity.[133X
  
  
  [1X7.7 [33X[0;0YAn rcwa mapping which seems to be contracting, but very slow[133X[101X
  
  [33X[0;0YThe  iterates of an integer under the Collatz mapping [22XT[122X seem to approach its
  contraction  centre  -- this is the finite set where all trajectories end up
  after  a  finite number of steps -- rather quickly and do not get very large
  before  doing so (of course this is a purely heuristic statement as the [22X3n+1[122X
  conjecture has not been proved so far!):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XT := RcwaMapping([[1,0,2],[3,1,2]]);;[127X[104X
    [4X[25Xgap>[125X [27XS0 := LikelyContractionCentre(T,100,1000);[127X[104X
    [4X[28X#I  Warning: `LikelyContractionCentre' is highly probabilistic.[128X[104X
    [4X[28XThe returned result can only be regarded as a rough guess.[128X[104X
    [4X[28XSee ?LikelyContractionCentre for more information.[128X[104X
    [4X[28X[ -136, -91, -82, -68, -61, -55, -41, -37, -34, -25, -17, -10, -7, -5, [128X[104X
    [4X[28X  -1, 0, 1, 2 ][128X[104X
    [4X[25Xgap>[125X [27XS0^T = S0; # This holds by definition of the contraction centre.[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XList([1..30],n->Length(Trajectory(T,n,S0)));[127X[104X
    [4X[28X[ 1, 1, 5, 2, 4, 6, 11, 3, 13, 5, 10, 7, 7, 12, 12, 4, 9, 14, 14, 6, 6, [128X[104X
    [4X[28X  11, 11, 8, 16, 8, 70, 13, 13, 13 ][128X[104X
    [4X[25Xgap>[125X [27XMaximum(List([1..1000],n->Length(Trajectory(T,n,S0))));[127X[104X
    [4X[28X113[128X[104X
    [4X[25Xgap>[125X [27XMaximum(List([1..1000],n->Maximum(Trajectory(T,n,S0))));[127X[104X
    [4X[28X125252[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  following mapping seems to be contracting as well, but its trajectories
  are much longer:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xf6 := RcwaMapping([[ 1,0,6],[ 5, 1,6],[ 7,-2,6],[127X[104X
    [4X[25X>[125X [27X                      [11,3,6],[11,-2,6],[11,-1,6]]);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(f6);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa mapping of Z with modulus 6[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | n/6       if n in 0(6)[128X[104X
    [4X[28X        | (5n+1)/6  if n in 1(6)[128X[104X
    [4X[28X        | (7n-2)/6  if n in 2(6)[128X[104X
    [4X[28X n |-> <  (11n+3)/6 if n in 3(6)[128X[104X
    [4X[28X        | (11n-2)/6 if n in 4(6)[128X[104X
    [4X[28X        | (11n-1)/6 if n in 5(6)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS0 := LikelyContractionCentre(f6,1000,100000);;[127X[104X
    [4X[28X#I  Warning: `LikelyContractionCentre' is highly probabilistic.[128X[104X
    [4X[28XThe returned result can only be regarded as a rough guess.[128X[104X
    [4X[28XSee ?LikelyContractionCentre for more information.[128X[104X
    [4X[25Xgap>[125X [27XTrajectory(f6,25,S0);[127X[104X
    [4X[28X[ 25, 21, 39, 72, 12, 2 ][128X[104X
    [4X[25Xgap>[125X [27XList([1..100],n->Length(Trajectory(f6,n,S0)));[127X[104X
    [4X[28X[ 1, 1, 3, 4, 1, 2, 3, 2, 1, 5, 7, 2, 8, 17, 3, 16, 1, 4, 17, 6, 5, 2, [128X[104X
    [4X[28X  5, 5, 6, 1, 4, 2, 15, 1, 1, 3, 2, 5, 13, 3, 2, 3, 4, 1, 8, 4, 4, 2, 7, [128X[104X
    [4X[28X  19, 23517, 3, 9, 3, 1, 18, 14, 2, 20, 23512, 14, 2, 6, 6, 1, 4, 19, [128X[104X
    [4X[28X  12, 23511, 8, 23513, 10, 1, 13, 13, 3, 1, 23517, 7, 20, 7, 9, 9, 6, [128X[104X
    [4X[28X  12, 8, 6, 18, 14, 23516, 31, 12, 23545, 4, 21, 19, 5, 1, 17, 17, 13, [128X[104X
    [4X[28X  19, 6, 23515 ][128X[104X
    [4X[25Xgap>[125X [27XMaximum(Trajectory(f6,47,S0));[127X[104X
    [4X[28X7363391777762473304431877054771075818733690108051469808715809256737742295\[128X[104X
    [4X[28X45698886054[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YComputing  the  trajectory  of  3224  takes quite a while -- this trajectory
  ascends  to  about [22X3 ⋅ 10^2197[122X, before it approaches the fixed point 2 after
  19949562 steps.[133X
  
  [33X[0;0YWhen  constructing  the mapping [10Xf6[110X, the denominators of the partial mappings
  have  been  chosen  to  be  equal  and the numerators have been chosen to be
  numbers  coprime  to  the common denominator, whose product is just a little
  bit  smaller than the [10XModulus(f6)[110Xth power of the denominator. In the example
  we have [22X5 ⋅ 7 ⋅ 11^3 = 46585[122X and [22X6^6 = 46656[122X.[133X
  
  [33X[0;0YAlthough  the  trajectories of [10XT[110X are much shorter than those of [10Xf6[110X, it seems
  likely that this does not make the problem of deciding whether the mapping [10XT[110X
  is  contracting  essentially  easier  -- even for mappings with much shorter
  trajectories  than [10XT[110X  the  problem  seems to be equally hard. A solution can
  usually  only be found in trivial cases, i.e. for example when there is some
  [22Xk[122X  such that applying the [22Xk[122Xth power of the respective mapping to any integer
  decreases its absolute value.[133X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().SlowlyContractingMappings);[110X in order
  to assign the global variables defined in this section.[133X
  
  
  [1X7.8 [33X[0;0YChecking a result by P. Andaloro[133X[101X
  
  [33X[0;0YIn [And00], P. Andaloro has shown that proving that trajectories of integers
  [22Xn  ∈ 1(16)[122X under the Collatz mapping always contain 1 would be sufficient to
  prove  the  [22X3n+1[122X conjecture. In the sequel, this result is verified by [5XRCWA[105X.
  Checking  that  the  union  of  the  images of the residue class 1(16) under
  powers  of the Collatz mapping [22XT[122X contains [22Xℤ ∖ 0(3)[122X is obviously enough. Thus
  we put [22XS := 1(16)[122X, and successively unite the set [22XS[122X with its image under [22XT[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XT := RcwaMapping([[1,0,2],[3,1,2]]);[127X[104X
    [4X[28X<rcwa mapping of Z with modulus 2>[128X[104X
    [4X[25Xgap>[125X [27XS := ResidueClass(Integers,16,1);[127X[104X
    [4X[28X1(16)[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X1(16) U 2(24)[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X1(12) U 2(24) U 17(48) U 33(48)[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 30 residue classes (mod 144)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 42 residue classes (mod 144)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 172 residue classes (mod 432)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 676 residue classes (mod 1296)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 810 residue classes (mod 1296)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 2638 residue classes (mod 3888)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 33 residue classes (mod 48)>[128X[104X
    [4X[25Xgap>[125X [27XS := Union(S,S^T);[127X[104X
    [4X[28X<union of 33 residue classes (mod 48)>[128X[104X
    [4X[25Xgap>[125X [27XUnion(S,ResidueClass(Integers,3,0)); # Et voila ...[127X[104X
    [4X[28XIntegers[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFurther similar computations are shown in Section [14X7.17[114X.[133X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().CollatzMapping);[110X  in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.9 [33X[0;0YTwo examples by Matthews and Leigh[133X[101X
  
  [33X[0;0YIn  [ML87],  K. R. Matthews and G. M. Leigh have shown that two trajectories
  of  the  following  (surjective,  but  not  injective)  mappings are acyclic
  (mod [22Xx[122X) and divergent:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx := Indeterminate(GF(4),1);; SetName(x,"x");[127X[104X
    [4X[25Xgap>[125X [27XR := PolynomialRing(GF(2),1);[127X[104X
    [4X[28XGF(2)[x][128X[104X
    [4X[25Xgap>[125X [27XML1 := RcwaMapping(R,x,[[1,0,x],[(x+1)^3,1,x]]*One(R));;[127X[104X
    [4X[25Xgap>[125X [27XML2 := RcwaMapping(R,x,[[1,0,x],[(x+1)^2,1,x]]*One(R));;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(ML1);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa mapping of GF(2)[x] with modulus x[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | P/x                     if P in 0(x)[128X[104X
    [4X[28X P |-> <  ((x^3+x^2+x+1)*P + 1)/x if P in 1(x)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDisplay(ML2);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa mapping of GF(2)[x] with modulus x[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | P/x               if P in 0(x)[128X[104X
    [4X[28X P |-> <  ((x^2+1)*P + 1)/x if P in 1(x)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList([ML1,ML2],IsSurjective);[127X[104X
    [4X[28X[ true, true ][128X[104X
    [4X[25Xgap>[125X [27XList([ML1,ML2],IsInjective);[127X[104X
    [4X[28X[ false, false ][128X[104X
    [4X[25Xgap>[125X [27Xtraj1 := Trajectory(ML1,One(R),16);[127X[104X
    [4X[28X[ 1, x^2+x+1, x^4+x^2+x, x^3+x+1, x^5+x^4+x^2, x^4+x^3+x, x^3+x^2+1, [128X[104X
    [4X[28X  x^5+x^2+1, x^7+x^6+x^5+x^3+1, x^9+x^7+x^6+x^5+x^3+x+1, [128X[104X
    [4X[28X  x^11+x^10+x^8+x^7+x^6+x^5+x^2, x^10+x^9+x^7+x^6+x^5+x^4+x, [128X[104X
    [4X[28X  x^9+x^8+x^6+x^5+x^4+x^3+1, x^11+x^8+x^7+x^6+x^4+x+1, [128X[104X
    [4X[28X  x^13+x^12+x^11+x^8+x^7+x^6+x^4, x^12+x^11+x^10+x^7+x^6+x^5+x^3 ][128X[104X
    [4X[25Xgap>[125X [27Xtraj2 := Trajectory(ML2,(x^3+x+1)*One(R),16);[127X[104X
    [4X[28X[ x^3+x+1, x^4+x+1, x^5+x^3+x^2+x+1, x^6+x^3+1, x^7+x^5+x^4+x^2+x, [128X[104X
    [4X[28X  x^6+x^4+x^3+x+1, x^7+x^4+x^3+x+1, x^8+x^6+x^5+x^4+x^3+x+1, [128X[104X
    [4X[28X  x^9+x^6+x^3+x+1, x^10+x^8+x^7+x^5+x^4+x+1, [128X[104X
    [4X[28X  x^11+x^8+x^7+x^5+x^4+x^3+x^2+x+1, x^12+x^10+x^9+x^8+x^7+x^5+1, [128X[104X
    [4X[28X  x^13+x^10+x^7+x^4+x, x^12+x^9+x^6+x^3+1, [128X[104X
    [4X[28X  x^13+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x, [128X[104X
    [4X[28X  x^12+x^10+x^9+x^7+x^6+x^4+x^3+x+1 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  pattern  which  Matthews  and  Leigh used to show the divergence of the
  above  trajectories can be recognized easily by looking at the corresponding
  Markov chains with the two states 0 mod [22Xx[122X and 1 mod [22Xx[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xtraj1modx := Trajectory(ML1,One(R),400,x);;[127X[104X
    [4X[25Xgap>[125X [27Xtraj2modx := Trajectory(ML2,(x^3+x+1)*One(R),600,x);;[127X[104X
    [4X[25Xgap>[125X [27XList(traj1modx{[1..150]},val->Position([Zero(R),One(R)],val)-1);[127X[104X
    [4X[28X[ 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ][128X[104X
    [4X[25Xgap>[125X [27XList(traj2modx{[1..150]},val->Position([Zero(R),One(R)],val)-1);[127X[104X
    [4X[28X[ 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, [128X[104X
    [4X[28X  1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, [128X[104X
    [4X[28X  0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWhat  is important here are the lengths of the intervals between two changes
  from one state to the other:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XChangePoints := l->Filtered([1..Length(l)-1],pos->l[pos]<>l[pos+1]);;[127X[104X
    [4X[25Xgap>[125X [27XDiffs := l->List([1..Length(l)-1],pos->l[pos+1]-l[pos]);;[127X[104X
    [4X[25Xgap>[125X [27XDiffs(ChangePoints(traj1modx)); # The pattern in the first ...[127X[104X
    [4X[28X[ 1, 1, 2, 4, 2, 2, 4, 8, 4, 4, 8, 16, 8, 8, 16, 32, 16, 16, 32, 64, 32, [128X[104X
    [4X[28X  32, 64 ][128X[104X
    [4X[25Xgap>[125X [27XDiffs(ChangePoints(traj2modx)); # ... and in the second example.[127X[104X
    [4X[28X[ 1, 7, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, [128X[104X
    [4X[28X  1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ][128X[104X
    [4X[25Xgap>[125X [27XDiffs(ChangePoints(last)); # Make this a bit more obvious.[127X[104X
    [4X[28X[ 1, 3, 1, 7, 1, 15, 1, 31, 1, 63, 1 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThis  looks  clearly acyclic, thus the trajectories diverge. Needless to say
  however  that  this  computational evidence does not replace the proof along
  these  lines given in the article cited above, but just sheds a light on the
  idea behind it.[133X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().MatthewsLeigh);[110X  in  order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.10 [33X[0;0YOrders of commutators[133X[101X
  
  [33X[0;0YWe enter some wild rcwa permutation:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xu := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;[127X[104X
    [4X[25Xgap>[125X [27XIsTame(u);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(u);[127X[104X
    [4X[28X[128X[104X
    [4X[28XWild rcwa permutation of Z with modulus 5[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 3n/5     if n in 0(5)[128X[104X
    [4X[28X        | (9n+1)/5 if n in 1(5)[128X[104X
    [4X[28X n |-> <  (3n-1)/5 if n in 2(5)[128X[104X
    [4X[28X        | (9n-2)/5 if n in 3(5)[128X[104X
    [4X[28X        | (9n+4)/5 if n in 4(5)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  would like to compute the order of [22X[u,n ↦ n + k][122X and [22X[u^2,n ↦ n + k][122X for
  different values of [22Xk[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xnu := ClassShift(0,1);; # n -> n + 1[127X[104X
    [4X[25Xgap>[125X [27Xl := Filtered([0..100],k->IsTame(Comm(u,nu^k)));[127X[104X
    [4X[28X[ 0, 2, 3, 5, 6, 9, 10, 12, 13, 15, 17, 18, 20, 21, 24, 25, 27, 28, 30, [128X[104X
    [4X[28X  32, 33, 35, 36, 39, 40, 42, 43, 45, 47, 48, 50, 51, 54, 55, 57, 58, [128X[104X
    [4X[28X  60, 62, 63, 65, 66, 69, 70, 72, 73, 75, 77, 78, 80, 81, 84, 85, 87, [128X[104X
    [4X[28X  88, 90, 92, 93, 95, 96, 99, 100 ][128X[104X
    [4X[25Xgap>[125X [27XList(l,k->Order(Comm(u,nu^k)));[127X[104X
    [4X[28X[ 1, 6, 5, 3, 5, 5, 3, infinity, 7, infinity, 7, 5, 3, infinity, [128X[104X
    [4X[28X  infinity, 3, 5, 7, infinity, 7, infinity, 3, 5, 5, 3, 5, infinity, [128X[104X
    [4X[28X  infinity, infinity, 5, 3, 5, 5, 3, infinity, 7, infinity, 7, 5, 3, [128X[104X
    [4X[28X  infinity, infinity, 3, 5, 7, infinity, 7, infinity, 3, 5, 5, 3, 5, [128X[104X
    [4X[28X  infinity, infinity, infinity, 5, 3, 5, 5, 3 ][128X[104X
    [4X[25Xgap>[125X [27Xu2 := u^2;[127X[104X
    [4X[28X<wild rcwa permutation of Z with modulus 25>[128X[104X
    [4X[25Xgap>[125X [27XFiltered([1..16],k->IsTame(Comm(u2,nu^k))); # k<15->[u^2,nu^k] wild![127X[104X
    [4X[28X[ 15 ][128X[104X
    [4X[25Xgap>[125X [27XOrder(Comm(u2,nu^15));[127X[104X
    [4X[28Xinfinity[128X[104X
    [4X[25Xgap>[125X [27Xu2nu17 := Comm(u2,nu^17);[127X[104X
    [4X[28X<rcwa permutation of Z with modulus 81>[128X[104X
    [4X[25Xgap>[125X [27Xcycs := ShortCycles(u2nu17,[-100..100],100);;[127X[104X
    [4X[25Xgap>[125X [27XList(cycs,Length);[127X[104X
    [4X[28X[ 72, 73, 72, 72, 72, 73, 72, 72, 73, 72, 72, 73, 72, 72, 73, 72, 72, [128X[104X
    [4X[28X  73, 72, 72, 73, 72, 72 ][128X[104X
    [4X[25Xgap>[125X [27XLcm(last);[127X[104X
    [4X[28X5256[128X[104X
    [4X[25Xgap>[125X [27Xu2nu17^5256; # This element has indeed order 2^3*3^2*73 = 5256.[127X[104X
    [4X[28XIdentityMapping( Integers )[128X[104X
    [4X[25Xgap>[125X [27Xu2nu18 := Comm(u2,nu^18);[127X[104X
    [4X[28X<rcwa permutation of Z with modulus 81>[128X[104X
    [4X[25Xgap>[125X [27Xcycs := ShortCycles(u2nu18,[-100..100],100);;[127X[104X
    [4X[25Xgap>[125X [27XList(cycs,Length);[127X[104X
    [4X[28X[ 21, 22, 22, 22, 21, 22, 22, 21, 22, 22, 21, 22, 21, 22, 22, 21, 22, [128X[104X
    [4X[28X  22, 21, 22, 22, 21, 22 ][128X[104X
    [4X[25Xgap>[125X [27XLcm(last);[127X[104X
    [4X[28X462[128X[104X
    [4X[25Xgap>[125X [27Xu2nu18^462; # This is an element of order 2*3*7*11 = 462.[127X[104X
    [4X[28XIdentityMapping( Integers )[128X[104X
    [4X[25Xgap>[125X [27XList([Comm(u2,nu^20),Comm(u2,nu^25),Comm(u2,nu^30)],Order);[127X[104X
    [4X[28X[ 29, 9, 15 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  observe that our commutators have various different orders, and that the
  prime factors of these orders are not all [21Xvery small[121X.[133X
  
  [33X[0;0YEnter [10XAssignGlobals(LoadRCWAExamples().CollatzlikePerms);[110X in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.11 [33X[0;0YAn infinite subgroup of CT(GF(2)[x]) with many torsion elements[133X[101X
  
  [33X[0;0YIn this section, we have a look at the following subgroup of CT(GF(2)[x]):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx := Indeterminate(GF(2));; SetName(x,"x");[127X[104X
    [4X[25Xgap>[125X [27XR := PolynomialRing(GF(2),1);[127X[104X
    [4X[28XGF(2)[x][128X[104X
    [4X[25Xgap>[125X [27Xa := ClassTransposition(0,x,1,x);;[127X[104X
    [4X[25Xgap>[125X [27Xb := ClassTransposition(0,x^2+1,1,x^2+1);;[127X[104X
    [4X[25Xgap>[125X [27Xc := ClassTransposition(1,x,0,x^2+x);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(a,b,c);[127X[104X
    [4X[28X<rcwa group over GF(2)[x] with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XDisplay(G);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa group over GF(2)[x], generated by[128X[104X
    [4X[28X[128X[104X
    [4X[28X[[128X[104X
    [4X[28XRcwa permutation of GF(2)[x]: P -> P + Z(2)^0[128X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of GF(2)[x] with modulus x^2+1, of order 2[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | P + 1 if P in 0(x^2+1) U 1(x^2+1)[128X[104X
    [4X[28X P |-> <  P     if P in x(x^2+1) U x+1(x^2+1)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of GF(2)[x] with modulus x^2+x, of order 2[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | (x+1)*P + x+1   if P in 1(x)[128X[104X
    [4X[28X P |-> <  (P + x+1)/(x+1) if P in 0(x^2+x)[128X[104X
    [4X[28X        | P               if P in x(x^2+x)[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[28X][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe can easily find 2 normal subgroups of [10XG[110X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XN1 := Subgroup(G,[a*b,a*c]);[127X[104X
    [4X[28X<rcwa group over GF(2)[x] with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsNormal(G,N1);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIndex(G,N1);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XG/N1;[127X[104X
    [4X[28XGroup([ (1,2), (1,2), (1,2) ])[128X[104X
    [4X[25Xgap>[125X [27XN2 := Subgroup(G,[a*b*c,a*c]);;[127X[104X
    [4X[25Xgap>[125X [27XIsNormal(G,N2);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubgroup(N1,N2);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YProducts  of  even  numbers  of generators of [10XG[110X may have infinite order. For
  example, we have[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XOrder(a*b);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XOrder(a*c);[127X[104X
    [4X[28Xinfinity[128X[104X
    [4X[25Xgap>[125X [27XOrder(b*c);[127X[104X
    [4X[28Xinfinity[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  would  like  to  have  a  look  at  orders of products of odd numbers of
  generators. In order to restrict our considerations to [21Xessentially different[121X
  products  (as  far as we can easily do this), we use the following auxiliary
  function:[133X
  
  [4X[32X  GAP code  [32X[104X
    [4X[104X
    [4XNormedWords := function ( F, lng )[104X
    [4X[104X
    [4X  local  words, gens, tuples, w;[104X
    [4X[104X
    [4X  gens   := GeneratorsOfGroup(F);[104X
    [4X  tuples := EnumeratorOfTuples([1..3],lng);[104X
    [4X  words  := [];[104X
    [4X[104X
    [4X  for w in tuples do[104X
    [4X    if    (w[1] = 1 or not 1 in w)[104X
    [4X      and PositionSublist(w,[1,1]) = fail[104X
    [4X      and PositionSublist(w,[2,2]) = fail[104X
    [4X      and PositionSublist(w,[3,3]) = fail[104X
    [4X      and PositionSublist(w,[2,1]) = fail[104X
    [4X      and w[1] < w[lng][104X
    [4X      and w{[1,lng]} <> [1,2][104X
    [4X      and (w{[1..3]} = [1,2,3] or PositionSublist(w,[1,2,3]) = fail)[104X
    [4X    then Add(words,w); fi;[104X
    [4X  od;[104X
    [4X[104X
    [4X  words := List(words,word->Product(List(word,i->gens[i])));[104X
    [4X  return words;[104X
    [4Xend;[104X
    [4X[104X
  [4X[32X[104X
  
  [33X[0;0YNow  let's  compute  the  possible  orders  of  products  of  3,  5,  7 or 9
  generators:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := FreeGroup("a","b","c");;[127X[104X
    [4X[25Xgap>[125X [27Xphi := EpimorphismByGenerators(F,G);[127X[104X
    [4X[28X[ a, b, c ] -> [128X[104X
    [4X[28X[ ClassTransposition(0,x,1,x), ClassTransposition(0,x^2+1,1,x^2+1), [128X[104X
    [4X[28X  ClassTransposition(1,x,0,x^2+x) ][128X[104X
    [4X[25Xgap>[125X [27XB3 := NormedWords(F,3);[127X[104X
    [4X[28X[ a*b*c ][128X[104X
    [4X[25Xgap>[125X [27XB3 := List(B3,g->g^phi);[127X[104X
    [4X[28X[ <rcwa permutation of GF(2)[x] with modulus x^3+x> ][128X[104X
    [4X[25Xgap>[125X [27XList(B3,Order);[127X[104X
    [4X[28X[ 20 ][128X[104X
    [4X[25Xgap>[125X [27XB5 := NormedWords(F,5);[127X[104X
    [4X[28X[ a*b*c*a*c, a*b*c*b*c ][128X[104X
    [4X[25Xgap>[125X [27XB5 := List(B5,g->g^phi);[127X[104X
    [4X[28X[ <rcwa permutation of GF(2)[x] with modulus x^3+x>, [128X[104X
    [4X[28X  <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x> ][128X[104X
    [4X[25Xgap>[125X [27XList(B5,Order);[127X[104X
    [4X[28X[ 12, 12 ][128X[104X
    [4X[25Xgap>[125X [27XB7 := NormedWords(F,7);[127X[104X
    [4X[28X[ a*b*c*a*c*a*c, a*b*c*a*c*b*c, a*b*c*b*c*a*c, a*b*c*b*c*b*c ][128X[104X
    [4X[25Xgap>[125X [27XB7 := List(B7,g->g^phi);[127X[104X
    [4X[28X[ <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x>, [128X[104X
    [4X[28X  <rcwa permutation of GF(2)[x] with modulus x^5+x>, [128X[104X
    [4X[28X  <rcwa permutation of GF(2)[x] with modulus x^4+x^3+x^2+x>, [128X[104X
    [4X[28X  <rcwa permutation of GF(2)[x] with modulus x^5+x> ][128X[104X
    [4X[25Xgap>[125X [27XList(B7,Order);[127X[104X
    [4X[28X[ 12, 12, 12, 30 ][128X[104X
    [4X[25Xgap>[125X [27XB9 := NormedWords(F,9);[127X[104X
    [4X[28X[ a*b*c*a*b*c*a*b*c, a*b*c*a*c*a*c*a*c, a*b*c*a*c*a*c*b*c, a*b*c*a*c*b*c*a*c, [128X[104X
    [4X[28X  a*b*c*a*c*b*c*b*c, a*b*c*b*c*a*c*a*c, a*b*c*b*c*a*c*b*c, a*b*c*b*c*b*c*a*c, [128X[104X
    [4X[28X  a*b*c*b*c*b*c*b*c ][128X[104X
    [4X[25Xgap>[125X [27XB9 := List(B9,g->g^phi);;[127X[104X
    [4X[25Xgap>[125X [27XList(B9,Order);[127X[104X
    [4X[28X[ 20, 4, 30, 12, 42, 30, 4, 42, 12 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter    [10XAssignGlobals(LoadRCWAExamples().OddNumberOfGens_FiniteOrder);[110X   in
  order to assign the global variables defined in this section.[133X
  
  
  [1X7.12 [33X[0;0YAn abelian rcwa group over a polynomial ring[133X[101X
  
  [33X[0;0YWe enter a 2-generated abelian wild rcwa group over GF(4)[[22Xx[122X]:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx := Indeterminate(GF(4),1);; SetName(x,"x");[127X[104X
    [4X[25Xgap>[125X [27XR := PolynomialRing(GF(4),1);[127X[104X
    [4X[28XGF(2^2)[x][128X[104X
    [4X[25Xgap>[125X [27Xe := One(GF(4));;[127X[104X
    [4X[25Xgap>[125X [27Xp := x^2 + x + e;;    q := x^2 + e;;[127X[104X
    [4X[25Xgap>[125X [27Xr := x^2 + x + Z(4);; s := x^2 + x + Z(4)^2;;[127X[104X
    [4X[25Xgap>[125X [27Xcg := List( AllResidues(R,x^2), pol -> [ p, p * pol mod q, q ] );;[127X[104X
    [4X[25Xgap>[125X [27Xch := List( AllResidues(R,x^2), pol -> [ r, r * pol mod s, s ] );;[127X[104X
    [4X[25Xgap>[125X [27Xg := RcwaMapping( R, q, cg );[127X[104X
    [4X[28X<rcwa mapping of GF(2^2)[x] with modulus x^2+1>[128X[104X
    [4X[25Xgap>[125X [27Xh := RcwaMapping( R, s, ch );[127X[104X
    [4X[28X<rcwa mapping of GF(2^2)[x] with modulus x^2+x+Z(2^2)^2>[128X[104X
    [4X[25Xgap>[125X [27XList([g,h],IsTame);[127X[104X
    [4X[28X[ false, false ][128X[104X
    [4X[25Xgap>[125X [27XG := Group(g,h);[127X[104X
    [4X[28X<rcwa group over GF(2^2)[x] with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsAbelian(G);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsTame(G);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIt  is  easy  to  see  that all orbits on GF(4)[[22Xx[122X] under the action of [10XG[110X are
  finite.[133X
  
  [33X[0;0YNow we compute the action of the group [10XG[110X on one of its orbits, and make some
  statistics of the orbits of [10XG[110X containing polynomials of degree less than 4:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xorb := Orbit(G,x^5);[127X[104X
    [4X[28X[ x^5, x^5+x^4+x^2+1, x^5+x^3+x^2+Z(2^2)*x+Z(2)^0, x^5+x^3, [128X[104X
    [4X[28X  x^5+x^4+x^3+x^2+Z(2^2)^2*x+Z(2^2)^2, x^5+x, x^5+x^4+x^3, [128X[104X
    [4X[28X  x^5+x^2+Z(2^2)^2*x, x^5+x^4+x^2+x, x^5+x^3+x^2+Z(2^2)^2*x+Z(2)^0, [128X[104X
    [4X[28X  x^5+x^4+Z(2^2)*x+Z(2^2), x^5+x^3+x, x^5+x^4+x^3+x^2+Z(2^2)*x+Z(2^2), [128X[104X
    [4X[28X  x^5+x^4+x^3+x+1, x^5+x^2+Z(2^2)*x, x^5+x^4+Z(2^2)^2*x+Z(2^2)^2 ][128X[104X
    [4X[25Xgap>[125X [27XH := Action(G,orb);[127X[104X
    [4X[28XGroup([ (1,2,4,7,6,9,12,14)(3,5,8,11,10,13,15,16), [128X[104X
    [4X[28X  (1,3,6,10)(2,5,9,13)(4,8,12,15)(7,11,14,16) ])[128X[104X
    [4X[25Xgap>[125X [27XIsAbelian(H); # check ...[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCyclic(H);  # H, and therefore also G, is not cyclic[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XExponent(H);[127X[104X
    [4X[28X8[128X[104X
    [4X[25Xgap>[125X [27XCollected(List(ShortOrbits(G,AllResidues(R,x^4),100),Length));[127X[104X
    [4X[28X[ [ 1, 4 ], [ 2, 6 ], [ 4, 12 ], [ 8, 24 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YChanging  the generators a little changes the structure of the group and its
  action on the underlying ring a lot:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xcg[1][2] := cg[1][2] + (x^2 + e) * p * q;;[127X[104X
    [4X[25Xgap>[125X [27Xch[7][2] := ch[7][2] + x * r * s;;[127X[104X
    [4X[25Xgap>[125X [27Xg := RcwaMapping( R, q, cg );; h := RcwaMapping( R, s, ch );;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(g,h);[127X[104X
    [4X[28X<rcwa group over GF(2^2)[x] with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsAbelian(G);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XSupport(G);[127X[104X
    [4X[28XGF(2^2)[x] \ [ 1, Z(2^2), Z(2^2)^2 ][128X[104X
    [4X[25Xgap>[125X [27Xorb := Orbit(G,Zero(R));;[127X[104X
    [4X[25Xgap>[125X [27XLength(orb);[127X[104X
    [4X[28X87[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(Action(G,orb));[127X[104X
    [4X[28X"A87"[128X[104X
    [4X[25Xgap>[125X [27XCollected(List(orb,DegreeOfLaurentPolynomial));[127X[104X
    [4X[28X[ [ -infinity, 1 ], [ 1, 2 ], [ 2, 4 ], [ 3, 16 ], [ 4, 64 ] ][128X[104X
    [4X[25Xgap>[125X [27XS := AllResidues(R,x^6);;[127X[104X
    [4X[25Xgap>[125X [27Xorbs := ShortOrbits(G,S,-1:finite);;[127X[104X
    [4X[25Xgap>[125X [27XList(orbs,Length);[127X[104X
    [4X[28X[ 87, 1, 1, 1, 2, 2, 2, 2, 2, 4, 4, 4, 20, 4, 12, 4, 20, 4, 4, 12, 8, 8, [128X[104X
    [4X[28X  48, 48, 16, 8, 8, 56, 8, 88, 8, 8, 8, 400, 16, 48, 16, 16, 16, 80, 16, [128X[104X
    [4X[28X  16, 16, 96, 32, 192, 32, 16, 16, 416, 16, 48, 16, 16, 880, 16, 16, 16, [128X[104X
    [4X[28X  16, 16, 16, 16, 16, 16, 848, 16, 16, 32, 16, 16, 16, 16, 16, 16, 16 ][128X[104X
    [4X[25Xgap>[125X [27XPosition(last,880);[127X[104X
    [4X[28X55[128X[104X
    [4X[25Xgap>[125X [27XSet(orbs[55],DegreeOfLaurentPolynomial); # all elm's have same degree[127X[104X
    [4X[28X[ 5 ][128X[104X
    [4X[25Xgap>[125X [27XH := Action(G,orbs[55]);;[127X[104X
    [4X[25Xgap>[125X [27XIsPrimitive(H,MovedPoints(H));[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XList(Blocks(H,MovedPoints(H)),Length);[127X[104X
    [4X[28X[ 110, 110, 110, 110, 110, 110, 110, 110 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().AbelianGroupOverPolynomialRing);[110X  in
  order to assign the global variables defined in this section.[133X
  
  
  [1X7.13 [33X[0;0YChecking for solvability[133X[101X
  
  [33X[0;0YPresently  there is no general method available for testing wild rcwa groups
  for  solvability.  However,  sometimes  the  question for solvability can be
  answered  anyway.  In  the  example  below, the idea is to find a subgroup [3XU[103X
  which  acts  on  a  finite  set [3XS[103X  of  integers,  and  which  induces on [3XS[103X a
  non-solvable finite permutation group:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);;[127X[104X
    [4X[25Xgap>[125X [27Xb := RcwaMapping([[3,0,2],[3,13,4],[3,0,2],[3,-1,4]]);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(a,b);;[127X[104X
    [4X[25Xgap>[125X [27XShortOrbits(Group(Comm(a,b)),[-10..10],100);[127X[104X
    [4X[28X[ [ -10 ], [ -9 ], [ -30, -21, -14, -13, -11, -8 ], [ -7 ], [ -6 ], [128X[104X
    [4X[28X  [ -12, -5, -4, -3, -2, 1 ], [ -1 ], [ 0 ], [ 2 ], [ 3 ], [128X[104X
    [4X[28X  [ 4, 5, 6, 7, 10, 15 ], [ 8 ], [ 9 ] ][128X[104X
    [4X[25Xgap>[125X [27XS := [ 4, 5, 6, 7, 10, 15 ];;[127X[104X
    [4X[25Xgap>[125X [27XCycle(Comm(a,b),4);[127X[104X
    [4X[28X[ 4, 7, 10, 15, 5, 6 ][128X[104X
    [4X[25Xgap>[125X [27Xelm := RepresentativeAction(G,S,Permuted(S,(1,4)),OnTuples);[127X[104X
    [4X[28X<rcwa permutation of Z with modulus 81>[128X[104X
    [4X[25Xgap>[125X [27XList(S,n->n^elm);[127X[104X
    [4X[28X[ 7, 5, 6, 4, 10, 15 ][128X[104X
    [4X[25Xgap>[125X [27XU := Group(Comm(a,b),elm);[127X[104X
    [4X[28X<rcwa group over Z with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XAction(U,S);[127X[104X
    [4X[28XGroup([ (1,4,5,6,2,3), (1,4) ])[128X[104X
    [4X[25Xgap>[125X [27XIsNaturalSymmetricGroup(last);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThus  the  subgroup  [3XU[103X  induces  on [3XS[103X a natural symmetric group of degree 6.
  Therefore the group [3XG[103X is not solvable. We conclude this example by factoring
  the group element [3Xelm[103X into generators:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XF := FreeGroup("a","b");[127X[104X
    [4X[28X<free group on the generators [ a, b ]>[128X[104X
    [4X[25Xgap>[125X [27XRepresentativeActionPreImage(G,S,Permuted(S,(1,4)),OnTuples,F);[127X[104X
    [4X[28Xa^-2*b^-2*a*b*a^-1*b*a*b^-2*a[128X[104X
    [4X[25Xgap>[125X [27Xa^-2*b^-2*a*b*a^-1*b*a*b^-2*a = elm;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().CheckingForSolvability);[110X in order to
  assign the global variables defined in this section.[133X
  
  
  [1X7.14 [33X[0;0YSome examples over (semi)localizations of the integers[133X[101X
  
  [33X[0;0YWe  start  with  something  one  can observe when trying to [21Xtransfer[121X an rcwa
  mapping from the ring of integers to one of its localizations:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := RcwaMapping([[3,0,2],[3,1,4],[3,0,2],[3,-1,4]]);;[127X[104X
    [4X[25Xgap>[125X [27XIsBijective(a);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xa2 := LocalizedRcwaMapping(a,2);[127X[104X
    [4X[28X<rcwa mapping of Z_( 2 ) with modulus 4>[128X[104X
    [4X[25Xgap>[125X [27XIsSurjective(a2); # As expected[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsInjective(a2); # Why not??[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27X0^a2;[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27X(1/3)^a2; # That's the reason![127X[104X
    [4X[28X0[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  above  can also be explained easily by pointing out that the modulus of
  the  inverse  of  [10Xa[110X  is 3,  and that 3 is a unit of [22Xℤ_(2)[122X. Moving to [22Xℤ_(2,3)[122X
  solves this problem:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa23 := SemilocalizedRcwaMapping(a,[2,3]);[127X[104X
    [4X[28X<rcwa mapping of Z_( 2, 3 ) with modulus 4>[128X[104X
    [4X[25Xgap>[125X [27XIsBijective(a23);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe get additional finite cycles, e.g.:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList(ShortOrbits(Group(a23),[0..50]/5,50),orb->Cycle(a23,orb[1]));[127X[104X
    [4X[28X[ [ 0 ], [ 1/5, 2/5, 3/5 ], [128X[104X
    [4X[28X  [ 4/5, 6/5, 9/5, 8/5, 12/5, 18/5, 27/5, 19/5, 13/5, 11/5, 7/5 ], [128X[104X
    [4X[28X  [ 1 ], [ 2, 3 ], [ 14/5, 21/5, 17/5 ], [128X[104X
    [4X[28X  [ 16/5, 24/5, 36/5, 54/5, 81/5, 62/5, 93/5, 71/5, 52/5, 78/5, 117/5, [128X[104X
    [4X[28X      89/5, 68/5, 102/5, 153/5, 116/5, 174/5, 261/5, 197/5, 149/5, [128X[104X
    [4X[28X      113/5, 86/5, 129/5, 98/5, 147/5, 109/5, 83/5, 61/5, 47/5, 34/5, [128X[104X
    [4X[28X      51/5, 37/5, 29/5, 23/5 ], [ 4, 6, 9, 7, 5 ] ][128X[104X
    [4X[25Xgap>[125X [27XList(last,Length);[127X[104X
    [4X[28X[ 1, 3, 11, 1, 2, 3, 34, 5 ][128X[104X
    [4X[25Xgap>[125X [27XList(ShortOrbits(Group(a23),[0..50]/7,50),orb->Cycle(a23,orb[1]));[127X[104X
    [4X[28X[ [ 0 ], [ -1/7, 1/7 ], [ 2/7, 3/7, 4/7, 6/7, 9/7, 5/7 ], [ 1 ], [128X[104X
    [4X[28X  [ 2, 3 ], [ 4, 6, 9, 7, 5 ] ][128X[104X
    [4X[25Xgap>[125X [27XList(last,Length);[127X[104X
    [4X[28X[ 1, 2, 6, 1, 2, 5 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YHowever  the  structure  of a group with prime set [22XP[122X remains invariant under
  the [21Xtransfer[121X from ℤ to [22Xℤ_(P)[122X.[133X
  
  [33X[0;0Y[21XTransferring[121X a non-invertible rcwa mapping from the ring of integers to some
  of its (semi)localizations can also turn it into an invertible one:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xv := RcwaMapping([[6,0,1],[1,-7,2],[6,0,1],[1,-1,1],[127X[104X
    [4X[25X>[125X [27X                     [6,0,1],[1, 1,2],[6,0,1],[1,-1,1]]);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(v);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa mapping of Z with modulus 8[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 6n      if n in 0(2)[128X[104X
    [4X[28X        | n-1     if n in 3(4)[128X[104X
    [4X[28X n |-> <  (n-7)/2 if n in 1(8)[128X[104X
    [4X[28X        | (n+1)/2 if n in 5(8)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsInjective(v);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSurjective(v);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XImage(v);[127X[104X
    [4X[28XZ \ 4(12) U 8(12)[128X[104X
    [4X[25Xgap>[125X [27XDifference(Integers,last);[127X[104X
    [4X[28X4(12) U 8(12)[128X[104X
    [4X[25Xgap>[125X [27Xv2 := LocalizedRcwaMapping(v,2);[127X[104X
    [4X[28X<rcwa mapping of Z_( 2 ) with modulus 8>[128X[104X
    [4X[25Xgap>[125X [27XIsBijective(v2);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDisplay(v2^-1);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z_( 2 ) with modulus 4[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 1/3 n / 2 if n in 0(4)[128X[104X
    [4X[28X        | 2 n + 7   if n in 1(4)[128X[104X
    [4X[28X n |-> <  n + 1     if n in 2(4)[128X[104X
    [4X[28X        | 2 n - 1   if n in 3(4)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS := ResidueClass(Z_pi(2),2,0);; l := [S];;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..10] do Add(l,l[Length(l)]^v2); od;[127X[104X
    [4X[25Xgap>[125X [27Xl; # Visibly v2 is wild ...[127X[104X
    [4X[28X[ 0(2), 0(4), 0(8), 0(16), 0(32), 0(64), 0(128), 0(256), 0(512),[128X[104X
    [4X[28X  0(1024), 0(2048) ][128X[104X
    [4X[25Xgap>[125X [27Xw2 := RcwaMapping(Z_pi(2),[[1,0,2],[2,-1,1],[1,1,1],[2,-1,1]]);;[127X[104X
    [4X[25Xgap>[125X [27Xv2w2 := Comm(v2,w2);; v2w2^-1;;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(v2w2);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z_( 2 ) with modulus 8[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 3 n   if n in 2(4)[128X[104X
    [4X[28X        | n + 4 if n in 1(8)[128X[104X
    [4X[28X n |-> <  n - 4 if n in 5(8)[128X[104X
    [4X[28X        | n     if n in 0(4) U 3(4)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YAgain, viewed as an rcwa mapping of the integers the commutator given at the
  end of the example would not be surjective.[133X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().Semilocals);[110X  in order to assign the
  global variables defined in this section.[133X
  
  
  [1X7.15 [33X[0;0YTwisting 257-cycles into an rcwa mapping with modulus 32[133X[101X
  
  [33X[0;0YWe define an rcwa mapping [3Xx[103X of order 257 with modulus 32. The easiest way to
  construct  such  a  mapping  is  to prescribe a transition graph and then to
  assign suitable affine mappings to its vertices.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xx_257 := RcwaMapping([127X[104X
    [4X[25X>[125X [27X     [[ 16,  2,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1, 16,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1, 16,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1, 16,  1], [ 16, 18,  1], [  1, 16,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1,  0, 16], [ 16, 18,  1], [  1,-14,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1,-14,  1], [ 16, 18,  1], [  1,-14,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1,-14,  1], [ 16, 18,  1], [  1,-14,  1], [ 16, 18,  1],[127X[104X
    [4X[25X>[125X [27X      [  1,-14,  1], [ 16, 18,  1], [  1,-14,  1], [  1,-31,  1]]);;[127X[104X
    [4X[25Xgap>[125X [27XOrder(x_257);; Display(x_257:CycleNotation:=false);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 32, of order 257[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | 16n+18 if n in 1(2) \ 31(32)[128X[104X
    [4X[28X        | n+16   if n in 2(32) U 4(32) U 6(32) U 8(32) U 10(32) U [128X[104X
    [4X[28X        |                12(32) U 14(32)[128X[104X
    [4X[28X        | n-14   if n in 18(32) U 20(32) U 22(32) U 24(32) U 26(32) U [128X[104X
    [4X[28X n |-> <                 28(32) U 30(32)[128X[104X
    [4X[28X        | 16n+2  if n in 0(32)[128X[104X
    [4X[28X        | n/16   if n in 16(32)[128X[104X
    [4X[28X        | n-31   if n in 31(32)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDisplay(x_257);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 32, of order 257[128X[104X
    [4X[28X[128X[104X
    [4X[28X( 0(32), 2(512), 18(512), 4(512), 20(512), 6(512), 22(512), [128X[104X
    [4X[28X  8(512), 24(512), 10(512), 26(512), 12(512), 28(512), 14(512), [128X[104X
    [4X[28X  30(512), 16(512), 1(32), 34(512), 50(512), 36(512), 52(512), [128X[104X
    [4X[28X  38(512), 54(512), 40(512), 56(512), 42(512), 58(512), 44(512), [128X[104X
    [4X[28X  60(512), 46(512), 62(512), 48(512), 3(32), 66(512), 82(512), [128X[104X
    [4X[28X  68(512), 84(512), 70(512), 86(512), 72(512), 88(512), 74(512), [128X[104X
    [4X[28X  90(512), 76(512), 92(512), 78(512), 94(512), 80(512), 5(32), [128X[104X
    [4X[28X  98(512), 114(512), 100(512), 116(512), 102(512), 118(512), [128X[104X
    [4X[28X  104(512), 120(512), 106(512), 122(512), 108(512), 124(512), [128X[104X
    [4X[28X  110(512), 126(512), 112(512), 7(32), 130(512), 146(512), [128X[104X
    [4X[28X  132(512), 148(512), 134(512), 150(512), 136(512), 152(512), [128X[104X
    [4X[28X  138(512), 154(512), 140(512), 156(512), 142(512), 158(512), [128X[104X
    [4X[28X  144(512), 9(32), 162(512), 178(512), 164(512), 180(512), [128X[104X
    [4X[28X  166(512), 182(512), 168(512), 184(512), 170(512), 186(512), [128X[104X
    [4X[28X  172(512), 188(512), 174(512), 190(512), 176(512), 11(32), [128X[104X
    [4X[28X  194(512), 210(512), 196(512), 212(512), 198(512), 214(512), [128X[104X
    [4X[28X  200(512), 216(512), 202(512), 218(512), 204(512), 220(512), [128X[104X
    [4X[28X  206(512), 222(512), 208(512), 13(32), 226(512), 242(512), [128X[104X
    [4X[28X  228(512), 244(512), 230(512), 246(512), 232(512), 248(512), [128X[104X
    [4X[28X  234(512), 250(512), 236(512), 252(512), 238(512), 254(512), [128X[104X
    [4X[28X  240(512), 15(32), 258(512), 274(512), 260(512), 276(512), [128X[104X
    [4X[28X  262(512), 278(512), 264(512), 280(512), 266(512), 282(512), [128X[104X
    [4X[28X  268(512), 284(512), 270(512), 286(512), 272(512), 17(32), [128X[104X
    [4X[28X  290(512), 306(512), 292(512), 308(512), 294(512), 310(512), [128X[104X
    [4X[28X  296(512), 312(512), 298(512), 314(512), 300(512), 316(512), [128X[104X
    [4X[28X  302(512), 318(512), 304(512), 19(32), 322(512), 338(512), [128X[104X
    [4X[28X  324(512), 340(512), 326(512), 342(512), 328(512), 344(512), [128X[104X
    [4X[28X  330(512), 346(512), 332(512), 348(512), 334(512), 350(512), [128X[104X
    [4X[28X  336(512), 21(32), 354(512), 370(512), 356(512), 372(512), [128X[104X
    [4X[28X  358(512), 374(512), 360(512), 376(512), 362(512), 378(512), [128X[104X
    [4X[28X  364(512), 380(512), 366(512), 382(512), 368(512), 23(32), [128X[104X
    [4X[28X  386(512), 402(512), 388(512), 404(512), 390(512), 406(512), [128X[104X
    [4X[28X  392(512), 408(512), 394(512), 410(512), 396(512), 412(512), [128X[104X
    [4X[28X  398(512), 414(512), 400(512), 25(32), 418(512), 434(512), [128X[104X
    [4X[28X  420(512), 436(512), 422(512), 438(512), 424(512), 440(512), [128X[104X
    [4X[28X  426(512), 442(512), 428(512), 444(512), 430(512), 446(512), [128X[104X
    [4X[28X  432(512), 27(32), 450(512), 466(512), 452(512), 468(512), [128X[104X
    [4X[28X  454(512), 470(512), 456(512), 472(512), 458(512), 474(512), [128X[104X
    [4X[28X  460(512), 476(512), 462(512), 478(512), 464(512), 29(32), [128X[104X
    [4X[28X  482(512), 498(512), 484(512), 500(512), 486(512), 502(512), [128X[104X
    [4X[28X  488(512), 504(512), 490(512), 506(512), 492(512), 508(512), [128X[104X
    [4X[28X  494(512), 510(512), 496(512), 31(32) )[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XLength(Cycle(x_257,0));[127X[104X
    [4X[28X257[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter [10XAssignGlobals(LoadRCWAExamples().LongCyclesOfPrimeLength);[110X in order to
  assign the global variables defined in this section.[133X
  
  
  [1X7.16 [33X[0;0YThe behaviour of the moduli of powers[133X[101X
  
  [33X[0;0YWe  give  some examples of how the series of the moduli of powers of a given
  rcwa mapping of the integers can look like.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := RcwaMapping([[3,0,2],[3, 1,4],[3,0,2],[3,-1,4]]);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..4],i->Modulus(a^i));[127X[104X
    [4X[28X[ 1, 4, 16, 64, 256 ][128X[104X
    [4X[25Xgap>[125X [27Xe1 := RcwaMapping([[1,4,1],[2,0,1],[1,0,2],[2,0,1]]);;[127X[104X
    [4X[25Xgap>[125X [27Xe2 := RcwaMapping([[1,4,1],[2,0,1],[1,0,2],[1,0,1],[127X[104X
    [4X[25X>[125X [27X                      [1,4,1],[2,0,1],[1,0,1],[1,0,1]]);;[127X[104X
    [4X[25Xgap>[125X [27XList([e1,e2],Order);[127X[104X
    [4X[28X[ infinity, infinity ][128X[104X
    [4X[25Xgap>[125X [27XList([1..20],i->Modulus(e1^i));[127X[104X
    [4X[28X[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ][128X[104X
    [4X[25Xgap>[125X [27XList([1..20],i->Modulus(e2^i));[127X[104X
    [4X[28X[ 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4 ][128X[104X
    [4X[25Xgap>[125X [27XDisplay(e2);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z with modulus 8, of order infinity[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | n+4 if n in 0(4)[128X[104X
    [4X[28X        | 2n  if n in 1(4)[128X[104X
    [4X[28X n |-> <  n/2 if n in 2(8)[128X[104X
    [4X[28X        | n   if n in 3(4) U 6(8)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xe2^2 = Restriction(RcwaMapping([[1,2,1]]),RcwaMapping([[4,0,1]]));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xg:=RcwaMapping([[2,2,1],[1, 4,1],[1,0,2],[2,2,1],[1,-4,1],[1,-2,1]]);;[127X[104X
    [4X[25Xgap>[125X [27Xh:=RcwaMapping([[2,2,1],[1,-2,1],[1,0,2],[2,2,1],[1,-1,1],[1, 1,1]]);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..7],i->Modulus(g^i));[127X[104X
    [4X[28X[ 1, 6, 12, 12, 12, 12, 6, 1 ][128X[104X
    [4X[25Xgap>[125X [27XList([1..18],i->Modulus((g^3*h)^i));[127X[104X
    [4X[28X[ 12, 6, 12, 12, 12, 6, 12, 6, 12, 12, 12, 6, 12, 6, 12, 12, 12, 6 ][128X[104X
    [4X[25Xgap>[125X [27Xu := RcwaMapping([[3,0,5],[9,1,5],[3,-1,5],[9,-2,5],[9,4,5]]);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..3],i->Modulus(u^i));[127X[104X
    [4X[28X[ 1, 5, 25, 125 ][128X[104X
    [4X[25Xgap>[125X [27Xv6 := RcwaMapping([[-1,2,1],[1,-1,1],[1,-1,1]]);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..6],i->Modulus(v6^i));[127X[104X
    [4X[28X[ 1, 3, 3, 3, 3, 3, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xw8 := RcwaMapping([[-1,3,1],[1,-1,1],[1,-1,1],[1,-1,1]]);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..8],i->Modulus(w8^i));[127X[104X
    [4X[28X[ 1, 4, 4, 4, 4, 4, 4, 4, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xz := RcwaMapping([[2,1,1],[1, 1,1],[2,-1,1],[2, -2,1],[127X[104X
    [4X[25X>[125X [27X                     [1,6,2],[1, 1,1],[1,-6,2],[2,  5,1],[127X[104X
    [4X[25X>[125X [27X                     [1,6,2],[1, 1,1],[1, 1,1],[2, -5,1],[127X[104X
    [4X[25X>[125X [27X                     [1,0,1],[1,-4,1],[1, 0,1],[2,-10,1]]);;[127X[104X
    [4X[25Xgap>[125X [27XIsBijective(z);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XList([0..25],i->Modulus(z^i));[127X[104X
    [4X[28X[ 1, 16, 32, 64, 64, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, [128X[104X
    [4X[28X  256, 256, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().ModuliOfPowers);[110X  in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.17 [33X[0;0YImages and preimages under the Collatz mapping[133X[101X
  
  [33X[0;0YWe  have  a look at the images of the residue class 1(2) under powers of the
  Collatz mapping.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XT := RcwaMapping([[1,0,2],[3,1,2]]);;[127X[104X
    [4X[25Xgap>[125X [27XS0 := ResidueClass(Integers,2,1);;[127X[104X
    [4X[25Xgap>[125X [27XS1 := S0^T;[127X[104X
    [4X[28X2(3)[128X[104X
    [4X[25Xgap>[125X [27XS2 := S1^T;[127X[104X
    [4X[28X1(3) U 8(9)[128X[104X
    [4X[25Xgap>[125X [27XS3 := S2^T;[127X[104X
    [4X[28X2(3) U 4(9)[128X[104X
    [4X[25Xgap>[125X [27XS4 := S3^T;[127X[104X
    [4X[28XZ \ 0(3) U 5(9)[128X[104X
    [4X[25Xgap>[125X [27XS5 := S4^T;[127X[104X
    [4X[28XZ \ 0(3) U 7(9)[128X[104X
    [4X[25Xgap>[125X [27XS6 := S5^T;[127X[104X
    [4X[28XZ \ 0(3)[128X[104X
    [4X[25Xgap>[125X [27XS7 := S6^T;[127X[104X
    [4X[28XZ \ 0(3)[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThus  the  image  gets stable after applying the mapping [22XT[122X for the 6th time.
  Hence  [22XT^6[122X  maps  the  residue class 1(2) surjectively onto the union of the
  residue classes 1(3) and 2(3), which [22XT[122X stabilizes setwise. Now we would like
  to  determine  the preimages of 1(3) and 2(3) in 1(2) under [22XT^6[122X. The residue
  class 1(2) has to be the disjoint union of these sets.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XU := Intersection(PreImage(T^6,ResidueClass(Integers,3,1)),S0);[127X[104X
    [4X[28X<union of 11 residue classes (mod 64)>[128X[104X
    [4X[25Xgap>[125X [27XV := Intersection(PreImage(T^6,ResidueClass(Integers,3,2)),S0);[127X[104X
    [4X[28X<union of 21 residue classes (mod 64)>[128X[104X
    [4X[25Xgap>[125X [27XAsUnionOfFewClasses(U);[127X[104X
    [4X[28X[ 1(64), 5(64), 7(64), 9(64), 21(64), 23(64), 29(64), 31(64), 49(64), [128X[104X
    [4X[28X  51(64), 59(64) ][128X[104X
    [4X[25Xgap>[125X [27XAsUnionOfFewClasses(V);[127X[104X
    [4X[28X[ 3(32), 11(32), 13(32), 15(32), 25(32), 17(64), 19(64), 27(64), 33(64), [128X[104X
    [4X[28X  37(64), 39(64), 41(64), 53(64), 55(64), 61(64), 63(64) ][128X[104X
    [4X[25Xgap>[125X [27XUnion(U,V) = S0 and Intersection(U,V) = [];  # consistency check[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe images of the residue class 0(3) under powers of [22XT[122X look as follows:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS0 := ResidueClass(Integers,3,0);[127X[104X
    [4X[28X0(3)[128X[104X
    [4X[25Xgap>[125X [27XS1 := S0^T;[127X[104X
    [4X[28X0(3) U 5(9)[128X[104X
    [4X[25Xgap>[125X [27XS2 := S1^T;[127X[104X
    [4X[28X0(3) U 5(9) U 7(9) U 8(27)[128X[104X
    [4X[25Xgap>[125X [27XS3 := S2^T;[127X[104X
    [4X[28X<union of 20 residue classes (mod 27) (6 classes)>[128X[104X
    [4X[25Xgap>[125X [27XS4 := S3^T;[127X[104X
    [4X[28X<union of 73 residue classes (mod 81)>[128X[104X
    [4X[25Xgap>[125X [27XS5 := S4^T;[127X[104X
    [4X[28XZ \ 10(81) U 37(81)[128X[104X
    [4X[25Xgap>[125X [27XS6 := S5^T;[127X[104X
    [4X[28XIntegers[128X[104X
    [4X[25Xgap>[125X [27XS7 := S6^T;[127X[104X
    [4X[28XIntegers[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThus  every  integer  is  the image of a multiple of 3 under [22XT^6[122X. This means
  that it would be sufficient to prove the [22X3n+1[122X conjecture for multiples of 3.
  We can obtain the corresponding result for multiples of 5 as follows:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS := [ResidueClass(Integers,5,0)];[127X[104X
    [4X[28X[ 0(5) ][128X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..12] do Add(S,S[i]^T); od;[127X[104X
    [4X[25Xgap>[125X [27Xfor s in S do View(s); Print("\n"); od;[127X[104X
    [4X[28X0(5)[128X[104X
    [4X[28X0(5) U 8(15)[128X[104X
    [4X[28X0(5) U 4(15) U 8(15)[128X[104X
    [4X[28X0(5) U 2(15) U 4(15) U 8(15) U 29(45)[128X[104X
    [4X[28X<union of 73 residue classes (mod 135)>[128X[104X
    [4X[28X<union of 244 residue classes (mod 405)>[128X[104X
    [4X[28X<union of 784 residue classes (mod 1215)>[128X[104X
    [4X[28X<union of 824 residue classes (mod 1215)>[128X[104X
    [4X[28X<union of 2593 residue classes (mod 3645)>[128X[104X
    [4X[28X<union of 2647 residue classes (mod 3645)>[128X[104X
    [4X[28X<union of 2665 residue classes (mod 3645)>[128X[104X
    [4X[28X<union of 2671 residue classes (mod 3645)>[128X[104X
    [4X[28X1(3) U 2(3) U 0(15)[128X[104X
    [4X[25Xgap>[125X [27XUnion(S[13],ResidueClass(Integers,3,0));[127X[104X
    [4X[28XIntegers[128X[104X
    [4X[25Xgap>[125X [27X List(S,Si->Float(Density(Si)));[127X[104X
    [4X[28X[ 0.2, 0.266667, 0.333333, 0.422222, 0.540741, 0.602469, 0.645267, [128X[104X
    [4X[28X  0.678189, 0.711385, 0.7262, 0.731139, 0.732785, 0.733333 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().CollatzMapping);[110X  in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.18 [33X[0;0YAn extension of the Collatz mapping T to a permutation of [22Xℤ^2[122X[101X[1X[133X[101X
  
  [33X[0;0YThe Collatz mapping [22XT[122X is surjective, but not injective:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XT := RcwaMapping([[1,0,2],[3,1,2]]);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(T);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa mapping of Z with modulus 2[128X[104X
    [4X[28X[128X[104X
    [4X[28X        /[128X[104X
    [4X[28X        | n/2      if n in 0(2)[128X[104X
    [4X[28X n |-> <  (3n+1)/2 if n in 1(2)[128X[104X
    [4X[28X        |[128X[104X
    [4X[28X        \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XIsInjective(T); IsSurjective(T);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XPreImages(T,2);[127X[104X
    [4X[28X[ 1, 4 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YOften,  dealing  with  rcwa  permutations  is  easier.  Indeed  the  Collatz
  mapping [22XT[122X  can  be  extended  in  natural  ways  to permutations of [22Xℤ^2[122X. For
  example,  the  following  permutation  acts  on  the  second coordinate just
  like [22XT[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSigma_T := RcwaMapping( Integers^2, [[1,0],[0,6]],[127X[104X
    [4X[25X>[125X [27X                           [[[[2,0],[0,1]],[0,0],2],[127X[104X
    [4X[25X>[125X [27X                            [[[4,0],[0,3]],[2,1],2],[127X[104X
    [4X[25X>[125X [27X                            [[[2,0],[0,1]],[0,0],2],[127X[104X
    [4X[25X>[125X [27X                            [[[4,0],[0,3]],[2,1],2],[127X[104X
    [4X[25X>[125X [27X                            [[[4,0],[0,1]],[0,0],2],[127X[104X
    [4X[25X>[125X [27X                            [[[4,0],[0,3]],[2,1],2]] );[127X[104X
    [4X[28X<rcwa mapping of Z^2 with modulus (1,0)Z+(0,6)Z>[128X[104X
    [4X[25Xgap>[125X [27XIsBijective(Sigma_T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDisplay(Sigma_T);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z^2 with modulus (1,0)Z+(0,6)Z[128X[104X
    [4X[28X[128X[104X
    [4X[28X            /[128X[104X
    [4X[28X            | (2m+1,(3n+1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z[128X[104X
    [4X[28X            | (m,n/2)         if (m,n) in (0,0)+(1,0)Z+(0,6)Z U [128X[104X
    [4X[28X (m,n) |-> <                              (0,2)+(1,0)Z+(0,6)Z[128X[104X
    [4X[28X            | (2m,n/2)        if (m,n) in (0,4)+(1,0)Z+(0,6)Z[128X[104X
    [4X[28X            |[128X[104X
    [4X[28X            \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDisplay(Sigma_T^-1);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z[128X[104X
    [4X[28X[128X[104X
    [4X[28X            /[128X[104X
    [4X[28X            | (m,2n)             if (m,n) in (0,0)+(1,0)Z+(0,3)Z U [128X[104X
    [4X[28X            |                                (0,1)+(1,0)Z+(0,3)Z[128X[104X
    [4X[28X (m,n) |-> <  (m/2,2n)           if (m,n) in (0,2)+(2,0)Z+(0,3)Z[128X[104X
    [4X[28X            | ((m-1)/2,(2n-1)/3) if (m,n) in (1,2)+(2,0)Z+(0,3)Z[128X[104X
    [4X[28X            |[128X[104X
    [4X[28X            \[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNow, the [22X3n+1[122X conjecture is equivalent to the assertion that the line [22Xn=4[122X is
  a set of representatives for the cycles of [10XSigma_T[110X on the half plane [22Xn > 0[122X.[133X
  
  [33X[0;0YLet's have a look at a part of a cycle of [10XSigma_T[110X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XTrajectory(Sigma_T,[0,27],75);[127X[104X
    [4X[28X[ [ 0, 27 ], [ 1, 41 ], [ 3, 62 ], [ 3, 31 ], [ 7, 47 ], [ 15, 71 ], [128X[104X
    [4X[28X  [ 31, 107 ], [ 63, 161 ], [ 127, 242 ], [ 127, 121 ], [ 255, 182 ], [128X[104X
    [4X[28X  [ 255, 91 ], [ 511, 137 ], [ 1023, 206 ], [ 1023, 103 ], [128X[104X
    [4X[28X  [ 2047, 155 ], [ 4095, 233 ], [ 8191, 350 ], [ 8191, 175 ], [128X[104X
    [4X[28X  [ 16383, 263 ], [ 32767, 395 ], [ 65535, 593 ], [ 131071, 890 ], [128X[104X
    [4X[28X  [ 131071, 445 ], [ 262143, 668 ], [ 262143, 334 ], [ 524286, 167 ], [128X[104X
    [4X[28X  [ 1048573, 251 ], [ 2097147, 377 ], [ 4194295, 566 ], [ 4194295, 283 ], [128X[104X
    [4X[28X  [ 8388591, 425 ], [ 16777183, 638 ], [ 16777183, 319 ], [128X[104X
    [4X[28X  [ 33554367, 479 ], [ 67108735, 719 ], [ 134217471, 1079 ], [128X[104X
    [4X[28X  [ 268434943, 1619 ], [ 536869887, 2429 ], [ 1073739775, 3644 ], [128X[104X
    [4X[28X  [ 1073739775, 1822 ], [ 2147479550, 911 ], [ 4294959101, 1367 ], [128X[104X
    [4X[28X  [ 8589918203, 2051 ], [ 17179836407, 3077 ], [ 34359672815, 4616 ], [128X[104X
    [4X[28X  [ 34359672815, 2308 ], [ 68719345630, 1154 ], [ 68719345630, 577 ], [128X[104X
    [4X[28X  [ 137438691261, 866 ], [ 137438691261, 433 ], [ 274877382523, 650 ], [128X[104X
    [4X[28X  [ 274877382523, 325 ], [ 549754765047, 488 ], [ 549754765047, 244 ], [128X[104X
    [4X[28X  [ 1099509530094, 122 ], [ 1099509530094, 61 ], [ 2199019060189, 92 ], [128X[104X
    [4X[28X  [ 2199019060189, 46 ], [ 4398038120378, 23 ], [ 8796076240757, 35 ], [128X[104X
    [4X[28X  [ 17592152481515, 53 ], [ 35184304963031, 80 ], [ 35184304963031, 40 ], [128X[104X
    [4X[28X  [ 70368609926062, 20 ], [ 70368609926062, 10 ], [ 140737219852124, 5 ], [128X[104X
    [4X[28X  [ 281474439704249, 8 ], [ 281474439704249, 4 ], [ 562948879408498, 2 ], [128X[104X
    [4X[28X  [ 562948879408498, 1 ], [ 1125897758816997, 2 ], [128X[104X
    [4X[28X  [ 1125897758816997, 1 ], [ 2251795517633995, 2 ], [128X[104X
    [4X[28X  [ 2251795517633995, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XTrajectory(Sigma_T^-1,[0,27],20);[127X[104X
    [4X[28X[ [ 0, 27 ], [ 0, 54 ], [ 0, 108 ], [ 0, 216 ], [ 0, 432 ], [ 0, 864 ], [128X[104X
    [4X[28X  [ 0, 1728 ], [ 0, 3456 ], [ 0, 6912 ], [ 0, 13824 ], [ 0, 27648 ], [128X[104X
    [4X[28X  [ 0, 55296 ], [ 0, 110592 ], [ 0, 221184 ], [ 0, 442368 ], [128X[104X
    [4X[28X  [ 0, 884736 ], [ 0, 1769472 ], [ 0, 3538944 ], [ 0, 7077888 ], [128X[104X
    [4X[28X  [ 0, 14155776 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWhile it seems easy to make conjectures regarding the behaviour of cycles of
  [10XSigma_T[110X, obtaining results on it is apparently hard. We observe however that
  [10XSigma_T[110X  can be written as a product of two permutations of [22Xℤ^2[122X whose cycles
  can be described easily:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xa := RcwaMapping(Integers^2,[[1,0],[0,2]],[[[[4,0],[0,1]],[0, 0],2],[127X[104X
    [4X[25X>[125X [27X                                              [[[4,0],[0,1]],[2,-1],2]]);[127X[104X
    [4X[28X<rcwa mapping of Z^2 with modulus (1,0)Z+(0,2)Z>[128X[104X
    [4X[25Xgap>[125X [27Xb := a^-1*Sigma_T;[127X[104X
    [4X[28X<rcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z>[128X[104X
    [4X[25Xgap>[125X [27XDisplay(a);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z^2 with modulus (1,0)Z+(0,2)Z[128X[104X
    [4X[28X[128X[104X
    [4X[28X            /[128X[104X
    [4X[28X            | (2m,n/2)       if (m,n) in (0,0)+(1,0)Z+(0,2)Z[128X[104X
    [4X[28X (m,n) |-> <  (2m+1,(n-1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z[128X[104X
    [4X[28X            |[128X[104X
    [4X[28X            \[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDisplay(b);[127X[104X
    [4X[28X[128X[104X
    [4X[28XRcwa permutation of Z^2 with modulus (2,0)Z+(0,3)Z[128X[104X
    [4X[28X[128X[104X
    [4X[28X            /[128X[104X
    [4X[28X            | (m,3n+2) if (m,n) in (1,0)+(2,0)Z+(0,1)Z[128X[104X
    [4X[28X            | (m/2,n)  if (m,n) in (0,0)+(2,0)Z+(0,3)Z U [128X[104X
    [4X[28X (m,n) |-> <                       (0,1)+(2,0)Z+(0,3)Z[128X[104X
    [4X[28X            | (m,n)    if (m,n) in (0,2)+(2,0)Z+(0,3)Z[128X[104X
    [4X[28X            |[128X[104X
    [4X[28X            \[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIt  is  easy  to  see that both [10Xa[110X and [10Xb[110X have infinite order. The cycles of [10Xa[110X
  have roughly hyperbolic shape and run, so to speak, from [22X(0,± ∞)[122X to [22X(± ∞,0)[122X.
  A  given  cycle contains only finitely many points both of whose coordinates
  are  nonzero. The fixed points of [10Xa[110X are (0,0) and (-1,-1). We have a look at
  an example of a cycle of [10Xa[110X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XTrajectory(a,[1000,1000],15);[127X[104X
    [4X[28X[ [ 1000, 1000 ], [ 2000, 500 ], [ 4000, 250 ], [ 8000, 125 ], [128X[104X
    [4X[28X  [ 16001, 62 ], [ 32002, 31 ], [ 64005, 15 ], [ 128011, 7 ], [128X[104X
    [4X[28X  [ 256023, 3 ], [ 512047, 1 ], [ 1024095, 0 ], [ 2048190, 0 ], [128X[104X
    [4X[28X  [ 4096380, 0 ], [ 8192760, 0 ], [ 16385520, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27XTrajectory(a^-1,[1000,1000],15);[127X[104X
    [4X[28X[ [ 1000, 1000 ], [ 500, 2000 ], [ 250, 4000 ], [ 125, 8000 ], [128X[104X
    [4X[28X  [ 62, 16001 ], [ 31, 32002 ], [ 15, 64005 ], [ 7, 128011 ], [128X[104X
    [4X[28X  [ 3, 256023 ], [ 1, 512047 ], [ 0, 1024095 ], [ 0, 2048190 ], [128X[104X
    [4X[28X  [ 0, 4096380 ], [ 0, 8192760 ], [ 0, 16385520 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIt is left as an easy exercise to the reader to find out how the cycles of [10Xb[110X
  look like.[133X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().ZxZ);[110X  in order to assign the global
  variables defined in this section.[133X
  
  
  [1X7.19 [33X[0;0YFinite quotients of Grigorchuk groups[133X[101X
  
  [33X[0;0YIn  this  section,  we  show  how  to  construct finite quotients of the two
  infinite  periodic groups introduced by Rostislav Grigorchuk in [Gri80] with
  the help of [5XRCWA[105X. The first of these, nowadays known as [21XGrigorchuk group[121X, is
  investigated   in   an   example   given   on   the   [5XGAP[105X   website  --  see
  [7Xhttp://www.gap-system.org/Doc/Examples/grigorchuk.html[107X.   The  [5XRCWA[105X  package
  permits  a  simpler and more elegant construction of the finite quotients of
  this  group:  The  function  [10XTopElement[110X  given on the mentioned webpage gets
  unnecessary, and the function [10XSequenceElement[110X can be simplified as follows:[133X
  
  [4X[32X[104X
    [4X[104X
    [4XSequenceElement := function ( r, level )[104X
    [4X[104X
    [4X  return Permutation(Product(Filtered([1..level-1],k->k mod 3 <> r),[104X
    [4X                             k->ClassTransposition(    2^(k-1)-1,2^(k+1),[104X
    [4X                                                   2^k+2^(k-1)-1,2^(k+1))),[104X
    [4X                     [0..2^level-1]);[104X
    [4Xend;[104X
    [4X[104X
  [4X[32X[104X
  
  [33X[0;0YThe actual constructors for the generators are modified as follows:[133X
  
  [4X[32X[104X
    [4X[104X
    [4Xa := level -> Permutation(ClassTransposition(0,2,1,2),[0..2^level-1]);[104X
    [4Xb := level -> SequenceElement(0,level);[104X
    [4Xc := level -> SequenceElement(2,level);[104X
    [4Xd := level -> SequenceElement(1,level);[104X
    [4X[104X
  [4X[32X[104X
  
  [33X[0;0YAll  computations  given  on  the  webpage  can now be done just as with the
  [21Xoriginal[121X  construction  of  the  quotients  of  the Grigorchuk group. In the
  sequel,  we  construct  finite  quotients  of  the  second  group introduced
  in [Gri80]:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XFourCycle := RcwaMapping((4,5,6,7),[4..7]);[127X[104X
    [4X[28X( 0(4), 1(4), 2(4), 3(4) )[128X[104X
    [4X[25Xgap>[125X [27XGrigorchukGroup2Generator := function ( level )[127X[104X
    [4X[25X>[125X [27X     if level = 1 then return FourCycle; else[127X[104X
    [4X[25X>[125X [27X       return   Restriction(FourCycle, RcwaMapping([[4,1,1]]))[127X[104X
    [4X[25X>[125X [27X              * Restriction(FourCycle, RcwaMapping([[4,3,1]]))[127X[104X
    [4X[25X>[125X [27X              * Restriction(GrigorchukGroup2Generator(level-1),[127X[104X
    [4X[25X>[125X [27X                            RcwaMapping([[4,0,1]]));[127X[104X
    [4X[25X>[125X [27X     fi;[127X[104X
    [4X[25X>[125X [27X   end;;[127X[104X
    [4X[25Xgap>[125X [27XGrigorchukGroup2 := level -> Group(FourCycle,[127X[104X
    [4X[25X>[125X [27X                                      GrigorchukGroup2Generator(level));;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  can do similar things as shown in the example on the [5XGAP[105X webpage for the
  [21Xfirst[121X Grigorchuk group:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := List([1..4],lev->GrigorchukGroup2(lev)); # The first 4 quotients.[127X[104X
    [4X[28X[ <rcwa group over Z with 2 generators>, [128X[104X
    [4X[28X  <rcwa group over Z with 2 generators>, [128X[104X
    [4X[28X  <rcwa group over Z with 2 generators>, [128X[104X
    [4X[28X  <rcwa group over Z with 2 generators> ][128X[104X
    [4X[25Xgap>[125X [27XH := List([1..4],lev->Action(G[lev],[0..4^lev-1])); # Isom. perm.-gps.[127X[104X
    [4X[28X[ Group([ (1,2,3,4), (1,2,3,4) ]), [128X[104X
    [4X[28X  Group([ (1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15,16), [128X[104X
    [4X[28X      (1,5,9,13)(2,6,10,14)(4,8,12,16) ]), [128X[104X
    [4X[28X  <permutation group with 2 generators>, [128X[104X
    [4X[28X  <permutation group with 2 generators> ][128X[104X
    [4X[25Xgap>[125X [27XList(H,Size);[127X[104X
    [4X[28X[ 4, 1024, 4294967296, 1329227995784915872903807060280344576 ][128X[104X
    [4X[25Xgap>[125X [27XList(last,n->Collected(Factors(n)));[127X[104X
    [4X[28X[ [ [ 2, 2 ] ], [ [ 2, 10 ] ], [ [ 2, 32 ] ], [ [ 2, 120 ] ] ][128X[104X
    [4X[25Xgap>[125X [27XList(H,NilpotencyClassOfGroup);      [127X[104X
    [4X[28X[ 1, 6, 14, 40 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().GrigorchukQuotients);[110X  in  order  to
  assign the global variables defined in this section.[133X
  
  
  [1X7.20 [33X[0;0YForward orbits of a monoid with 2 generators[133X[101X
  
  [33X[0;0YThe  [22X3n+1[122X  conjecture asserts that the forward orbit of any positive integer
  under  the  Collatz  mapping [22XT[122X contains 1. In contrast, it seems likely that
  [21Xmost[121X trajectories of the two mappings[133X
  
                                        /
                                        | n/2          if n even,
            T_5+/-:  Z -> Z,   n  |->  <
                                        | (5n +/- 1)/2 if n odd
                                        \
  
  [33X[0;0Ydiverge.  However we can show by means of computation that the forward orbit
  of  any positive integer under the action of the monoid generated by the two
  mappings  [22XT_5^-[122X  and [22XT_5^+[122X  indeed  contains 1.  First  of all, we enter the
  generators:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XT5m := RcwaMapping([[1,0,2],[5,-1,2]]);;[127X[104X
    [4X[25Xgap>[125X [27XT5p := RcwaMapping([[1,0,2],[5, 1,2]]);;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe  look  for  a  number [22Xk[122X such that for any residue class [22Xr(2^k)[122X there is a
  product [22Xf[122X  of  [22Xk[122X mappings  [22XT_5^±[122X whose restriction to [22Xr(2^k)[122X is given by [22Xn ↦
  (an+b)/c[122X where [22Xc>a[122X:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk := 1;;[127X[104X
    [4X[25Xgap>[125X [27Xrepeat[127X[104X
    [4X[25X>[125X [27X     maps := List(Tuples([T5m,T5p],k),Product);[127X[104X
    [4X[25X>[125X [27X     decr := List(maps,DecreasingOn);[127X[104X
    [4X[25X>[125X [27X     decreasable := Union(decr);[127X[104X
    [4X[25X>[125X [27X     Print(k,": "); View(decreasable); Print("\n");[127X[104X
    [4X[25X>[125X [27X     k := k + 1;[127X[104X
    [4X[25X>[125X [27X   until decreasable = Integers;[127X[104X
    [4X[28X1: 0(2)[128X[104X
    [4X[28X2: 0(4)[128X[104X
    [4X[28X3: Z \ 1(8) U 7(8)[128X[104X
    [4X[28X4: 0(4) U 3(16) U 6(16) U 10(16) U 13(16)[128X[104X
    [4X[28X5: Z \ 7(32) U 25(32)[128X[104X
    [4X[28X6: <union of 48 residue classes (mod 64)>[128X[104X
    [4X[28X7: Integers[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThus [22Xk=7[122X serves our purposes. To be sure that for any positive integer [22Xn[122X our
  monoid  contains  a  mapping  [22Xf[122X such that [22Xn^f<n[122X, we still need to check this
  condition for [21Xsmall[121X [22Xn[122X. Since in case [22Xc>a[122X we have [22X(an+b)/c ≥ n[122X if only if [22Xn ≤
  b/(c-a)[122X, we only need to check those [22Xn[122X which are not larger than the largest
  coefficient [22Xb_r(m)[122X occurring in any of the products under consideration:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xmaxb := Maximum(List(maps,f->Maximum(List(Coefficients(f),t->t[2]))));[127X[104X
    [4X[28X25999[128X[104X
    [4X[25Xgap>[125X [27Xsmall := Filtered([1..maxb],n->ForAll(maps,f->n^f>=n));[127X[104X
    [4X[28X[ 1, 7, 9, 11 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThis  means that except of 1, only for [22Xn ∈ {7,9,11}[122X there is no product of 7
  mappings  [22XT_5^±[122X  which  maps  [22Xn[122X to a smaller integer. We check that also the
  forward  orbits  of these three integers contain 1 by successively computing
  preimages of 1:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XS := [1];; k := 0;;[127X[104X
    [4X[25Xgap>[125X [27Xrepeat[127X[104X
    [4X[25X>[125X [27X     S := Union(S,PreImage(T5m,S),PreImage(T5p,S));[127X[104X
    [4X[25X>[125X [27X     k := k+1;[127X[104X
    [4X[25X>[125X [27X   until IsSubset(S,small);[127X[104X
    [4X[25Xgap>[125X [27Xk;[127X[104X
    [4X[28X17[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().CollatzMapping);[110X  in order to assign
  the global variables defined in this section.[133X
  
  
  [1X7.21 [33X[0;0YThe free group of rank 2 and the modular group PSL(2,ℤ)[133X[101X
  
  [33X[0;0YThe  free  group  of rank 2 embeds into RCWA(ℤ) -- in fact it embeds even in
  the  subgroup  which  is  generated by all class transpositions. An explicit
  embedding  can  be  constructed  by  transferring  the  construction  of the
  so-called  [21XSchottky  groups[121X  (cf. [dlH00], page 27) from PSL(2,ℂ) to RCWA(ℤ)
  (we use the notation from the cited book):[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XD := AllResidueClassesModulo(4);[127X[104X
    [4X[28X[ 0(4), 1(4), 2(4), 3(4) ][128X[104X
    [4X[25Xgap>[125X [27Xgamma1 := RepresentativeAction(RCWA(Integers),[127X[104X
    [4X[25X>[125X [27X                                  Difference(Integers,D[1]),D[2]);;[127X[104X
    [4X[25Xgap>[125X [27Xgamma2 := RepresentativeAction(RCWA(Integers),[127X[104X
    [4X[25X>[125X [27X                                  Difference(Integers,D[3]),D[4]);;[127X[104X
    [4X[25Xgap>[125X [27XF2 := Group(gamma1,gamma2);[127X[104X
    [4X[28X<rcwa group over Z with 2 generators>[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YWe can do some checks:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XX1 := Union(D{[1,2]});; X2 := Union(D{[3,4]});;[127X[104X
    [4X[25Xgap>[125X [27X    IsSubset(X1,X2^gamma1) and IsSubset(X1,X2^(gamma1^-1))[127X[104X
    [4X[25X>[125X [27X   and IsSubset(X2,X1^gamma2) and IsSubset(X2,X1^(gamma2^-1));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe generators are products of 3 class transpositions, each:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XFactorization(gamma1);[127X[104X
    [4X[28X[ ( 0(2), 1(2) ), ( 3(4), 5(8) ), ( 0(2), 1(8) ) ][128X[104X
    [4X[25Xgap>[125X [27XFactorization(gamma2);[127X[104X
    [4X[28X[ ( 0(2), 1(2) ), ( 1(4), 7(8) ), ( 0(2), 3(8) ) ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe above construction is used by [2XIsomorphismRcwaGroup[102X ([14X3.1-1[114X) to embed free
  groups of any rank [22X≥ 2[122X.[133X
  
  [33X[0;0YWe  give another only slightly different representation of the free group of
  rank 2.  We  verify  that  it  really  is  one  by  applying  the  so-called
  [13XTable-Tennis  Lemma[113X (see e.g. [dlH00], Section II.B.) to the infinite cyclic
  groups generated by the two generators and to the same two sets [10XX1[110X and [10XX2[110X as
  above:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xr1 := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,1,4);;[127X[104X
    [4X[25Xgap>[125X [27Xr2 := ClassTransposition(0,2,1,2)*ClassTransposition(0,2,3,4);;[127X[104X
    [4X[25Xgap>[125X [27XF2 := Group(r1^2,r2^2);;[127X[104X
    [4X[25Xgap>[125X [27XList(GeneratorsOfGroup(F2),IsTame);[127X[104X
    [4X[28X[ false, false ][128X[104X
    [4X[25Xgap>[125X [27X    IsSubset(X1,X2^F2.1) and IsSubset(X1,X2^(F2.1^-1))[127X[104X
    [4X[25X>[125X [27X   and IsSubset(X2,X1^F2.2) and IsSubset(X2,X1^(F2.2^-1));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27X[Sources(r1),Sinks(r1),Loops(r1)]; # compare with X1[127X[104X
    [4X[28X[ [ 0(4) ], [ 1(4) ], [ 0(4), 1(4) ] ][128X[104X
    [4X[25Xgap>[125X [27X[Sources(r2),Sinks(r2),Loops(r2)]; # compare with X2[127X[104X
    [4X[28X[ [ 2(4) ], [ 3(4) ], [ 2(4), 3(4) ] ][128X[104X
    [4X[25Xgap>[125X [27X   IsSubset(X1,Union(Sinks(r1))) and IsSubset(X1,Union(Sinks(r1^-1)))[127X[104X
    [4X[25X>[125X [27X  and IsSubset(X2,Union(Sinks(r2))) and IsSubset(X2,Union(Sinks(r2^-1)));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubset(Union(Sinks(r1)),X2^F2.1) and[127X[104X
    [4X[25X>[125X [27X   IsSubset(Union(Sinks(r1^-1)),X2^(F2.1^-1));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubset(Union(Sinks(r2)),X1^F2.2) and[127X[104X
    [4X[25X>[125X [27X   IsSubset(Union(Sinks(r2^-1)),X1^(F2.2^-1));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YDrawing  the  transition  graphs  of  [10Xr1[110X  and  [10Xr2[110X  for modulus 4 may help to
  understand what is actually done in this calculation. It is easy to see that
  the group generated by [10Xr1[110X and [10Xr2[110X is [13Xnot[113X free:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XOrder(r1/r2);[127X[104X
    [4X[28X3[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  modular group PSL(2,ℤ) embeds into CT(ℤ) as well. We give an embedding,
  and check that it really is one by applying the Table Tennis Lemma as above:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XPSL2Z := [127X[104X
    [4X[25X>[125X [27X     Group(ClassTransposition(0,3,1,3) * ClassTransposition(0,3,2,3),[127X[104X
    [4X[25X>[125X [27X           ClassTransposition(1,3,0,6) * ClassTransposition(2,3,3,6));;[127X[104X
    [4X[25Xgap>[125X [27XList(GeneratorsOfGroup(PSL2Z),Order);[127X[104X
    [4X[28X[ 3, 2 ][128X[104X
    [4X[25Xgap>[125X [27XX1 := Difference(Integers,ResidueClass(0,3));[127X[104X
    [4X[28XZ \ 0(3)[128X[104X
    [4X[25Xgap>[125X [27XX2 := ResidueClass(0,3);[127X[104X
    [4X[28X0(3)[128X[104X
    [4X[25Xgap>[125X [27XIsSubset(X1,X2^PSL2Z.1) and IsSubset(X1,X2^(PSL2Z.1^2));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSubset(X2,X1^PSL2Z.2);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YA  slightly  different  representation  of PSL(2,ℤ) can be obtained by using
  [5XRCWA[105X's  general  method for [10XIsomorphismRcwaGroup[110X for free products of finite
  groups:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XG := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(3),[127X[104X
    [4X[25X>[125X [27X                                               CyclicGroup(2))));[127X[104X
    [4X[28X<wild rcwa group over Z with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XList(GeneratorsOfGroup(G),Factorization);[127X[104X
    [4X[28X[ [ ( 0(4), 2(4) ), ( 1(2), 0(4) ) ], [ ( 0(2), 1(2) ) ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YEnter  [10XAssignGlobals(LoadRCWAExamples().F2_PSL2Z);[110X  in  order  to assign the
  global variables defined in this section.[133X
  
