% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[a4paper,11pt]{report}

\usepackage[top=37mm,bottom=37mm,left=27mm,right=27mm]{geometry}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083}
\definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179}
\definecolor{RoyalGreen}{rgb}{0.0236,0.6179,0.0894}
\definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894}
\definecolor{LightBlue}{rgb}{0.8544,0.9511,1.0000}
\definecolor{Black}{rgb}{0.0,0.0,0.0}

\definecolor{linkColor}{rgb}{0.0,0.0,0.554}
\definecolor{citeColor}{rgb}{0.0,0.0,0.554}
\definecolor{fileColor}{rgb}{0.0,0.0,0.554}
\definecolor{urlColor}{rgb}{0.0,0.0,0.554}
\definecolor{promptColor}{rgb}{0.0,0.0,0.589}
\definecolor{brkpromptColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapinputColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapoutputColor}{rgb}{0.0,0.0,0.0}

%%  for a long time these were red and blue by default,
%%  now black, but keep variables to overwrite
\definecolor{FuncColor}{rgb}{0.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,0.0}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}


\usepackage{fancyvrb}

\usepackage{mathptmx,helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}


\usepackage[
            pdftex=true,
            bookmarks=true,        
            a4paper=true,
            pdftitle={Written with GAPDoc},
            pdfcreator={LaTeX with hyperref package / GAPDoc},
            colorlinks=true,
            backref=page,
            breaklinks=true,
            linkcolor=linkColor,
            citecolor=citeColor,
            filecolor=fileColor,
            urlcolor=urlColor,
            pdfpagemode={UseNone}, 
           ]{hyperref}

\newcommand{\maintitlesize}{\fontsize{50}{55}\selectfont}

% write page numbers to a .pnr log file for online help
\newwrite\pagenrlog
\immediate\openout\pagenrlog =\jobname.pnr
\immediate\write\pagenrlog{PAGENRS := [}
\newcommand{\logpage}[1]{\protect\write\pagenrlog{#1, \thepage,}}
%% were never documented, give conflicts with some additional packages

\newcommand{\GAP}{\textsf{GAP}}

%% nicer description environments, allows long labels
\usepackage{enumitem}
\setdescription{style=nextline}

%% depth of toc
\setcounter{tocdepth}{1}





%% command for ColorPrompt style examples
\newcommand{\gapprompt}[1]{\color{promptColor}{\bfseries #1}}
\newcommand{\gapbrkprompt}[1]{\color{brkpromptColor}{\bfseries #1}}
\newcommand{\gapinput}[1]{\color{gapinputColor}{#1}}


\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\mbox{}\vfill

\begin{center}{\maintitlesize \textbf{The \textsf{ThreeKPlusOne} Package\mbox{}}}\\
\vfill

\hypersetup{pdftitle=The \textsf{ThreeKPlusOne} Package}
\markright{\scriptsize \mbox{}\hfill The \textsf{ThreeKPlusOne} Package \hfill\mbox{}}
{\Huge Version 42\mbox{}}\\[1cm]
\mbox{}\\[2cm]
{\Large \textbf{Dummy Auth{\"o}r  \mbox{}}}\\
\hypersetup{pdfauthor=Dummy Auth{\"o}r  }
\end{center}\vfill

\mbox{}\\
{\mbox{}\\
\small \noindent \textbf{Dummy Auth{\"o}r  }  Email: \href{mailto://3kplusone@dev.null} {\texttt{3kplusone@dev.null}}}\\
\end{titlepage}

\newpage\setcounter{page}{2}
{\small 
\section*{Copyright}
\logpage{[ 0, 0, 1 ]}
{\copyright} 2000 The Author. 

 You can do with this package what you want.

 Really. \mbox{}}\\[1cm]
\newpage

\def\contentsname{Contents\logpage{[ 0, 0, 2 ]}}

\tableofcontents
\newpage

 
\chapter{\textcolor{Chapter }{The $3k+1$ Problem}}\logpage{[ 1, 0, 0 ]}
\hyperdef{L}{X8769FB038733F6F4}{}
{
  
\section{\textcolor{Chapter }{Theory}}\label{sec:theory}
\logpage{[ 1, 1, 0 ]}
\hyperdef{L}{X8729B87B848E3F89}{}
{
  Let $k \in {\ensuremath{\mathbb N}}$ be a natural number. We consider the sequence $n(i, k), i \in {\ensuremath{\mathbb N}},$ with $n(1, k) = k$ and else $n(i+1, k) = n(i, k) / 2$ if $n(i, k)$ is even and $n(i+1, k) = 3 n(i, k) + 1$ if $n(i, k)$ is odd. 

 It is not known whether for any natural number $k \in {\ensuremath{\mathbb N}}$ there is an $m \in {\ensuremath{\mathbb N}}$ with $n(m, k) = 1$. 

 \textsf{ThreeKPlusOne} provides the function \texttt{ThreeKPlusOneSequence} (\ref{ThreeKPlusOneSequence}) to explore this for given $n$. If you really want to know something about this problem, see \cite{Wi98} or \href{http://www.ku.de/mgf/mathematik/lehrstuhlstatistik/team/dr-guenther-wirsching/} {\texttt{http://www.ku.de/mgf/mathematik/lehrstuhlstatistik/team/dr-guenther-wirsching/}} for more details (and forget this package). }

 
\section{\textcolor{Chapter }{Program}}\logpage{[ 1, 2, 0 ]}
\hyperdef{L}{X7A4605C07A94C9F6}{}
{
  In this section we describe the main function of this package. 

\subsection{\textcolor{Chapter }{ThreeKPlusOneSequence}}
\logpage{[ 1, 2, 1 ]}\nobreak
\hyperdef{L}{X7B1A31B8870EA092}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ThreeKPlusOneSequence({\mdseries\slshape k[, max]})\index{ThreeKPlusOneSequence@\texttt{ThreeKPlusOneSequence}}
\label{ThreeKPlusOneSequence}
}\hfill{\scriptsize (function)}}\\


 This function computes for a natural number \mbox{\texttt{\mdseries\slshape k}} the beginning of the sequence $n(i, k)$ defined in section \ref{sec:theory}. The sequence stops at the first $1$ or at $n(\mbox{\texttt{\mdseries\slshape max}}, k)$, if \mbox{\texttt{\mdseries\slshape max}} is given. 
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
  !gapprompt@gap>| !gapinput@ThreeKPlusOneSequence(101);|
  "Sorry, not yet implemented. Wait for Version 84 of the package"
\end{Verbatim}
 }

 }

 }

 \def\bibname{References\logpage{[ "Bib", 0, 0 ]}
\hyperdef{L}{X7A6F98FD85F02BFE}{}
}

\bibliographystyle{alpha}
\bibliography{3k+1}

\addcontentsline{toc}{chapter}{References}

\def\indexname{Index\logpage{[ "Ind", 0, 0 ]}
\hyperdef{L}{X83A0356F839C696F}{}
}

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Index}


\printindex

\newpage
\immediate\write\pagenrlog{["End"], \arabic{page}];}
\immediate\closeout\pagenrlog
\end{document}
