  
  [1XA. The File [11X3k+1.xml[0X[1X[0X
  
  Here  is  the  complete  source  of  the  example  [5XGAPDoc[0X  document [11X3k+1.xml[0X
  discussed in Section [14X1.2[0X.
  
  [4X---------------------------  3k+1.xml  ---------------------------[0X
    [4X<?xml version="1.0" encoding="UTF-8"?>[0X
    [4X[0X
    [4X<!--   A complete "fake package" documentation   [0X
    [4X   $Id: app3k1.xml,v 1.3 2007/02/20 16:56:27 gap Exp $[0X
    [4X-->[0X
    [4X[0X
    [4X<!DOCTYPE Book SYSTEM "gapdoc.dtd">[0X
    [4X[0X
    [4X<Book Name="3k+1">[0X
    [4X[0X
    [4X<TitlePage>[0X
    [4X  <Title>The <Package>ThreeKPlusOne</Package> Package</Title>[0X
    [4X  <Version>Version 42</Version>[0X
    [4X  <Author>Dummy Authör[0X
    [4X    <Email>3kplusone@dev.null</Email>[0X
    [4X  </Author>[0X
    [4X[0X
    [4X  <Copyright>&copyright; 2000 The Author. <P/>[0X
    [4X    You can do with this package what you want.<P/> Really.[0X
    [4X  </Copyright>[0X
    [4X</TitlePage>[0X
    [4X[0X
    [4X<TableOfContents/>[0X
    [4X[0X
    [4X<Body>[0X
    [4X  <Chapter> <Heading>The <M>3k+1</M> Problem</Heading>[0X
    [4X    <Section Label="sec:theory"> <Heading>Theory</Heading>[0X
    [4X      Let <M>k \in \N</M> be a natural number. We consider the sequence[0X
    [4X      <M>n(i,  k), i  \in  \N,</M> with  <M>n(1, k)  =  k</M> and  else[0X
    [4X      <M>n(i+1, k)  = n(i, k)  / 2</M> if  <M>n(i, k)</M> is  even and[0X
    [4X      <M>n(i+1, k) = 3 n(i, k) + 1</M> if <M>n(i, k)</M> is odd.[0X
    [4X      <P/>[0X
    [4X      It is  not known whether for  any natural number <M>k  \in \N</M> [0X
    [4X      there is an <M>m \in \N</M> with <M>n(m, k) = 1</M>.              [0X
    [4X      <P/>[0X
    [4X      <Package>ThreeKPlusOne</Package>  provides   the  function  <Ref[0X
    [4X      Func="ThreeKPlusOneSequence"/>   to  explore   this  for   given[0X
    [4X      <M>n</M>.  If  you really  want  to  know something  about  this[0X
    [4X      problem, see <Cite Key="Wi98"/> or[0X
    [4X      <URL>http://mathsrv.ku-eichstaett.de/MGF/homes/wirsching/</URL>[0X
    [4X      for more details (and forget this package).[0X
    [4X    </Section>[0X
    [4X[0X
    [4X    <Section> <Heading>Program</Heading>[0X
    [4X      In this section we describe the main function of this package.[0X
    [4X      <ManSection> [0X
    [4X        <Func Name="ThreeKPlusOneSequence" Arg="k[, max]"/>[0X
    [4X        <Description>[0X
    [4X          This  function computes  for a  natural number  <A>k</A> the[0X
    [4X          beginning of the sequence  <M>n(i, k)</M> defined in section[0X
    [4X          <Ref Sect="sec:theory"/>.  The sequence  stops at  the first[0X
    [4X          <M>1</M>  or at  <M>n(<A>max</A>, k)</M>,  if <A>max</A>  is[0X
    [4X          given.[0X
    [4X<Example>[0X
    [4Xgap> ThreeKPlusOneSequence(101);[0X
    [4X"Sorry, not yet implemented. Wait for Version 84 of the package"[0X
    [4X</Example>[0X
    [4X        </Description>[0X
    [4X      </ManSection>[0X
    [4X    </Section>[0X
    [4X  </Chapter>[0X
    [4X</Body>[0X
    [4X[0X
    [4X<Bibliography Databases="3k+1" />[0X
    [4X<TheIndex/>[0X
    [4X[0X
    [4X</Book>[0X
  [4X------------------------------------------------------------------[0X
  
