Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1XA [33X[0;0YThe File [11X3k+1.xml[111X[101X[1X[133X[101X23[33X[0;0YHere is the complete source of the example [5XGAPDoc[105X document [11X3k+1.xml[111X4discussed in Section [14X1.2[114X.[133X56[4X[32X 3k+1.xml [32X[104X7[4X<?xml version="1.0" encoding="UTF-8"?>[104X8[4X[104X9[4X<!-- A complete "fake package" documentation [104X10[4X-->[104X11[4X[104X12[4X<!DOCTYPE Book SYSTEM "gapdoc.dtd">[104X13[4X[104X14[4X<Book Name="3k+1">[104X15[4X[104X16[4X<TitlePage>[104X17[4X <Title>The <Package>ThreeKPlusOne</Package> Package</Title>[104X18[4X <Version>Version 42</Version>[104X19[4X <Author>Dummy Authör[104X20[4X <Email>[email protected]</Email>[104X21[4X </Author>[104X22[4X[104X23[4X <Copyright>©right; 2000 The Author. <P/>[104X24[4X You can do with this package what you want.<P/> Really.[104X25[4X </Copyright>[104X26[4X</TitlePage>[104X27[4X[104X28[4X<TableOfContents/>[104X29[4X[104X30[4X<Body>[104X31[4X <Chapter> <Heading>The <M>3k+1</M> Problem</Heading>[104X32[4X <Section Label="sec:theory"> <Heading>Theory</Heading>[104X33[4X Let <M>k \in &NN;</M> be a natural number. We consider the[104X34[4X sequence <M>n(i, k), i \in &NN;,</M> with <M>n(1, k) = k</M> and[104X35[4X else <M>n(i+1, k) = n(i, k) / 2</M> if <M>n(i, k)</M> is even[104X36[4X and <M>n(i+1, k) = 3 n(i, k) + 1</M> if <M>n(i, k)</M> is odd.[104X37[4X <P/> It is not known whether for any natural number <M>k \in[104X38[4X &NN;</M> there is an <M>m \in &NN;</M> with <M>n(m, k) = 1</M>.[104X39[4X <P/>[104X40[4X <Package>ThreeKPlusOne</Package> provides the function <Ref[104X41[4X Func="ThreeKPlusOneSequence"/> to explore this for given[104X42[4X <M>n</M>. If you really want to know something about this[104X43[4X problem, see <Cite Key="Wi98"/> or[104X44[4X <URL>http://www.ku.de/mgf/mathematik/lehrstuhlstatistik/team/dr-guenther-wirsching/</URL>[104X45[4X for more details (and forget this package).[104X46[4X </Section>[104X47[4X[104X48[4X <Section> <Heading>Program</Heading>[104X49[4X In this section we describe the main function of this package.[104X50[4X <ManSection> [104X51[4X <Func Name="ThreeKPlusOneSequence" Arg="k[, max]"/>[104X52[4X <Description>[104X53[4X This function computes for a natural number <A>k</A> the[104X54[4X beginning of the sequence <M>n(i, k)</M> defined in section[104X55[4X <Ref Sect="sec:theory"/>. The sequence stops at the first[104X56[4X <M>1</M> or at <M>n(<A>max</A>, k)</M>, if <A>max</A> is[104X57[4X given.[104X58[4X<Example>[104X59[4Xgap> ThreeKPlusOneSequence(101);[104X60[4X"Sorry, not yet implemented. Wait for Version 84 of the package"[104X61[4X</Example>[104X62[4X </Description>[104X63[4X </ManSection>[104X64[4X </Section>[104X65[4X </Chapter>[104X66[4X</Body>[104X67[4X[104X68[4X<Bibliography Databases="3k+1" />[104X69[4X<TheIndex/>[104X70[4X[104X71[4X</Book>[104X72[4X[104X73[4X[32X[104X74757677