  
  [1X6 [33X[0;0YReidemeister zeta and generating functions[133X[101X
  
  [33X[0;0YPlease  note  that  the  functions  in this chapter are only implemented for
  endomorphisms of finite groups.[133X
  
  
  [1X6.1 [33X[0;0YDecomposing Reidemeister number sequences[133X[101X
  
  [33X[0;0YFor  a finite group, the sequence of Reidemeister numbers of the iterates of
  [3Xendo1[103X  and [3Xendo2[103X, i.e. the sequence [10XR([3Xendo1[103X[10X,[3Xendo2[103X[10X)[110X, [10XR([3Xendo1[103X[10X^2,[3Xendo2[103X[10X^2)[110X, ...,
  is  eventually  periodic.  Thus there exist a periodic sequence [23X(P_n)_{n \in
  \mathbb{N}}[123X  and  an  eventually zero sequence [23X(Q_n)_{n \in \mathbb{N}}[123X such
  that[133X
  
  
  [24X[33X[0;6Y\forall n \in \mathbb{N}: R(\varphi^n,\psi^n) = P_n + Q_n.[133X
  
  [124X
  
  [1X6.1-1 IteratedReidemeisterNumberDecomposition[101X
  
  [33X[1;0Y[29X[2XIteratedReidemeisterNumberDecomposition[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ytwo  lists  of integers: the first list contains one period of the
            sequence  [23X(P_n)_{n  \in  \mathbb{N}}[123X,  the  second  list  contains
            [23X(Q_n)_{n  \in  \mathbb{N}}[123X  up  to  the  part where it becomes the
            constant zero sequence.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XG := PcGroupCode( 3913, 12 );;[127X[104X
    [4X[25Xgap>[125X [27Xphi := GroupHomomorphismByImages( G, G, [ G.1, G.3 ],[127X[104X
    [4X[25X>[125X [27X [ One( G ), One( G ) ] );;[127X[104X
    [4X[25Xgap>[125X [27Xpsi := GroupHomomorphismByImages( G, G, [ G.1, G.3 ],[127X[104X
    [4X[25X>[125X [27X [ G.2, One( G ) ] );;[127X[104X
    [4X[25Xgap>[125X [27XIteratedReidemeisterNumberDecomposition( phi );[127X[104X
    [4X[28X[ [ 1 ], [  ] ][128X[104X
    [4X[25Xgap>[125X [27XIteratedReidemeisterNumberDecomposition( phi, psi );[127X[104X
    [4X[28X[ [ 12 ], [ -6 ] ][128X[104X
  [4X[32X[104X
  
  
  [1X6.2 [33X[0;0YReidemeister zeta functions[133X[101X
  
  [33X[0;0YLet    [23X\varphi,\psi\colon    G    \to   G[123X   be   endomorphisms   such   that
  [23XR(\varphi^n,\psi^n) < \infty[123X for all [23Xn \in \mathbb{N}[123X. Then the [13XReidemeister
  zeta function[113X [23XZ_{\varphi,\psi}(s)[123X of the pair [23X(\varphi,\psi)[123X is defined as[133X
  
  
  [24X[33X[0;6YZ_{\varphi,\psi}(s)  := \exp \sum_{n=1}^\infty \frac{R(\varphi^n,\psi^n)}{n}
  s^n.[133X
  
  [124X
  
  [1X6.2-1 IsRationalReidemeisterZetaFunction[101X
  
  [33X[1;0Y[29X[2XIsRationalReidemeisterZetaFunction[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X  if  the  Reidemeister  zeta  function  of [3Xendo1[103X and [3Xendo2[103X is
            rational, otherwise [9Xfalse[109X.[133X
  
  [1X6.2-2 ReidemeisterZetaFunction[101X
  
  [33X[1;0Y[29X[2XReidemeisterZetaFunction[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ythe  Reidemeister  zeta  function  of  [3Xendo1[103X  and  [3Xendo2[103X  if it is
            rational, otherwise [9Xfail[109X.[133X
  
  [1X6.2-3 PrintReidemeisterZetaFunction[101X
  
  [33X[1;0Y[29X[2XPrintReidemeisterZetaFunction[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya  string  describing  the Reidemeister zeta function of [3Xendo1[103X and
            [3Xendo2[103X.[133X
  
  [33X[0;0YThis is often more readable than evaluating [2XReidemeisterZetaFunction[102X ([14X6.2-2[114X)
  in an indeterminate, and does not require rationality.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsRationalReidemeisterZetaFunction( phi );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRationalReidemeisterZetaFunction( phi, psi );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs := Indeterminate( Rationals, "s" );;[127X[104X
    [4X[25Xgap>[125X [27XReidemeisterZetaFunction( phi )( s );[127X[104X
    [4X[28X(1)/(-s+1)[128X[104X
    [4X[25Xgap>[125X [27XPrintReidemeisterZetaFunction( phi, psi );[127X[104X
    [4X[28X"exp(-6*s)*(1-s)^(-12)"[128X[104X
  [4X[32X[104X
  
  
  [1X6.3 [33X[0;0YReidemeister generating functions[133X[101X
  
  [33X[0;0YLet    [23X\varphi,\psi\colon    G    \to   G[123X   be   endomorphisms   such   that
  [23XR(\varphi^n,\psi^n) < \infty[123X for all [23Xn \in \mathbb{N}[123X. Then the [13XReidemeister
  generating  function[113X  [23XZ^*_{\varphi,\psi}(s)[123X  of  the  pair [23X(\varphi,\psi)[123X is
  defined as[133X
  
  
  [24X[33X[0;6YZ^*_{\varphi,\psi}(s) := \sum_{n=1}^\infty R(\varphi^n,\psi^n) s^n.[133X
  
  [124X
  
  [1X6.3-1 IsRationalReidemeisterGeneratingFunction[101X
  
  [33X[1;0Y[29X[2XIsRationalReidemeisterGeneratingFunction[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X if the Reidemeister generating function of [3Xendo1[103X and [3Xendo2[103X is
            rational, otherwise [9Xfalse[109X.[133X
  
  [1X6.3-2 ReidemeisterGeneratingFunction[101X
  
  [33X[1;0Y[29X[2XReidemeisterGeneratingFunction[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ythe  Reidemeister  generating function of [3Xendo1[103X and [3Xendo2[103X if it is
            rational, otherwise [9Xfail[109X.[133X
  
  [1X6.3-3 PrintReidemeisterGeneratingFunction[101X
  
  [33X[1;0Y[29X[2XPrintReidemeisterGeneratingFunction[102X( [3Xendo1[103X[, [3Xendo2[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya  string describing the Reidemeister generating function of [3Xendo1[103X
            and [3Xendo2[103X.[133X
  
  [33X[0;0YThis  is  often more readable than evaluating [2XReidemeisterGeneratingFunction[102X
  ([14X6.3-2[114X) in an indeterminate, and does not require rationality.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsRationalReidemeisterGeneratingFunction( phi, psi );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XReidemeisterGeneratingFunction( phi, psi )( 2 );[127X[104X
    [4X[28X-36[128X[104X
    [4X[25Xgap>[125X [27XPrintReidemeisterGeneratingFunction( phi, psi );[127X[104X
    [4X[28X"(6*s^2+6*s)/(-s+1)"[128X[104X
  [4X[32X[104X
  
