CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
2
A The File 3k+1.xml
3
4
Here is the complete source of the example GAPDoc document 3k+1.xml
5
discussed in Section 1.2.
6
7
 3k+1.xml 
8
<?xml version="1.0" encoding="UTF-8"?>
9

10
<!-- A complete "fake package" documentation 
11
-->
12

13
<!DOCTYPE Book SYSTEM "gapdoc.dtd">
14

15
<Book Name="3k+1">
16

17
<TitlePage>
18
 <Title>The <Package>ThreeKPlusOne</Package> Package</Title>
19
 <Version>Version 42</Version>
20
 <Author>Dummy Authör
21
 <Email>[email protected]</Email>
22
 </Author>
23

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

29
<TableOfContents/>
30

31
<Body>
32
 <Chapter> <Heading>The <M>3k+1</M> Problem</Heading>
33
 <Section Label="sec:theory"> <Heading>Theory</Heading>
34
 Let <M>k \in &NN;</M> be a natural number. We consider the
35
 sequence <M>n(i, k), i \in &NN;,</M> with <M>n(1, k) = k</M> and
36
 else <M>n(i+1, k) = n(i, k) / 2</M> if <M>n(i, k)</M> is even
37
 and <M>n(i+1, k) = 3 n(i, k) + 1</M> if <M>n(i, k)</M> is odd.
38
 <P/> It is not known whether for any natural number <M>k \in
39
 &NN;</M> there is an <M>m \in &NN;</M> with <M>n(m, k) = 1</M>.
40
 <P/>
41
 <Package>ThreeKPlusOne</Package> provides the function <Ref
42
 Func="ThreeKPlusOneSequence"/> to explore this for given
43
 <M>n</M>. If you really want to know something about this
44
 problem, see <Cite Key="Wi98"/> or
45
 <URL>http://www.ku.de/mgf/mathematik/lehrstuhlstatistik/team/dr-guenther-wirsching/</URL>
46
 for more details (and forget this package).
47
 </Section>
48

49
 <Section> <Heading>Program</Heading>
50
 In this section we describe the main function of this package.
51
 <ManSection> 
52
 <Func Name="ThreeKPlusOneSequence" Arg="k[, max]"/>
53
 <Description>
54
 This function computes for a natural number <A>k</A> the
55
 beginning of the sequence <M>n(i, k)</M> defined in section
56
 <Ref Sect="sec:theory"/>. The sequence stops at the first
57
 <M>1</M> or at <M>n(<A>max</A>, k)</M>, if <A>max</A> is
58
 given.
59
<Example>
60
gap> ThreeKPlusOneSequence(101);
61
"Sorry, not yet implemented. Wait for Version 84 of the package"
62
</Example>
63
 </Description>
64
 </ManSection>
65
 </Section>
66
 </Chapter>
67
</Body>
68

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

72
</Book>
73

74

75
76
77