<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>GAP (GAPDoc) - Appendix A: The File 3k+1.xml</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="generator" content="GAPDoc2HTML" /> <link rel="stylesheet" type="text/css" href="manual.css" /> </head> <body> <div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chapA.html">A</a> <a href="chapB.html">B</a> <a href="chapC.html">C</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div> <div class="chlinkprevnexttop"> <a href="chap0.html">Top of Book</a> <a href="chap7.html">Previous Chapter</a> <a href="chapB.html">Next Chapter</a> </div> <p><a id="X830C58F97F9CD901" name="X830C58F97F9CD901"></a></p> <div class="ChapSects"><a href="chapA.html#X830C58F97F9CD901">A <span class="Heading">The File <code class="file">3k+1.xml</code></span></a> </div> <h3>A <span class="Heading">The File <code class="file">3k+1.xml</code></span></h3> <p>Here is the complete source of the example <strong class="pkg">GAPDoc</strong> document <code class="file">3k+1.xml</code> discussed in Section <a href="chap1.html#X7B47AFA881BFC9DC"><b>1.2</b></a>.</p> <table class="example"> <tr><td><pre> <?xml version="1.0" encoding="UTF-8"?> <!-- A complete "fake package" documentation $Id: 3k+1.xml,v 1.4 2007/10/04 22:02:12 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 &NN;</M> be a natural number. We consider the sequence <M>n(i, k), i \in &NN;,</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 &NN;</M> there is an <M>m \in &NN;</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> </pre></td></tr></table> <div class="chlinkprevnextbot"> <a href="chap0.html">Top of Book</a> <a href="chap7.html">Previous Chapter</a> <a href="chapB.html">Next Chapter</a> </div> <div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chapA.html">A</a> <a href="chapB.html">B</a> <a href="chapC.html">C</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div> <hr /> <p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p> </body> </html>