The file 3k+1.xml

Here is the complete source of the example &GAPDoc; document 3k+1.xml discussed in Section .

<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- A complete "fake package" documentation $Id: app3k1.xml,v 1.1.1.1 2001/01/05 13:37:49 gap Exp $ -->

<!DOCTYPE Book SYSTEM "gapdoc.dtd">

<Book Name="3k+1">

<TitlePage> <Title>The <Package>ThreeKPlusOne</Package> Package</Title> <Version>Version 42</Version> <Author>Dummy Authör <Email>3kplusone@dev.null</Email> </Author>

<Copyright>&copyright; 2000 The Author. <P/> You can do with this package what you want.<P/> Really. </Copyright> </TitlePage>

<TableOfContents/>

<Body> <Chapter> <Heading>The <M>3k+1</M> Problem</Heading> <Section Label="sec:theory"> <Heading>Theory</Heading> Let <M>k \in \N</M> be a natural number. We consider the sequence <M>n(i, k), i \in \N,</M> with <M>n(1, k) = k</M> and else <M>n(i+1, k) = n(i, k) / 2</M> if <M>n(i, k)</M> is even and <M>n(i+1, k) = 3 n(i, k) + 1</M> if <M>n(i, k)</M> is odd. <P/> It is not known whether for any natural number <M>k \in \N</M> there is an <M>m \in \N</M> with <M>n(m, k) = 1</M>. <P/> <Package>ThreeKPlusOne</Package> provides the function <Ref Func="ThreeKPlusOneSequence"/> to explore this for given <M>n</M>. If you really want to know something about this problem, see <Cite Key="Wi98"/> or <URL>http://mathsrv.ku-eichstaett.de/MGF/homes/wirsching/</URL> for more details (and forget this package). </Section>

<Section> <Heading>Program</Heading> In this section we describe the main function of this package. <ManSection> <Func Name="ThreeKPlusOneSequence" Arg="k[, max]"/> <Description> This function computes for a natural number <A>k</A> the beginning of the sequence <M>n(i, k)</M> defined in section <Ref Sect="sec:theory"/>. The sequence stops at the first <M>1</M> or at <M>n(<A>max</A>, k)</M>, if <A>max</A> is given. <Example> gap> ThreeKPlusOneSequence(101); "Sorry, not yet implemented. Wait for Version 84 of the package" </Example> </Description> </ManSection> </Section> </Chapter> </Body>

<Bibliography Databases="3k+1" /> <TheIndex/>

</Book>