% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[11pt]{report}
\usepackage{a4wide}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage{isolatin1}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}
\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{FuncColor}{rgb}{1.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,1.0}

\usepackage{fancyvrb}

\usepackage{pslatex}

\usepackage[
        a4paper=true,bookmarks=false,pdftitle={Written with GAPDoc},
        colorlinks=true,backref=page,breaklinks=true,linkcolor=RoyalBlue,
        citecolor=RoyalGreen,filecolor=RoyalRed,
        urlcolor=RoyalRed,pagecolor=RoyalBlue]{hyperref}

% 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,}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\F}{\mathbb{F}}

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

\newsavebox{\backslashbox}
\sbox{\backslashbox}{\texttt{\symbol{92}}}
\newcommand{\bs}{\usebox{\backslashbox}}

\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\begin{center}{\Huge \textbf{The \textsf{ThreeKPlusOne} Package}}\\[1cm]
\markright{\scriptsize \mbox{}\hfill The \textsf{ThreeKPlusOne} Package \hfill\mbox{}}
{Version 42}\\[1cm]
\mbox{}\\[3cm]
{\large \textbf{Dummy Authör  }}\\
\end{center}\vfill

\mbox{}\\
{\small \noindent \textbf{Dummy Authö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. }\\[1cm]
\newpage

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

\tableofcontents
\newpage

 
\chapter{\textcolor{Chapter }{The $3k+1$ Problem}}\logpage{[ 1, 0, 0 ]}
{
  
\section{\textcolor{Chapter }{Theory}}\label{sec:theory}
\logpage{[ 1, 1, 0 ]}
{
  Let $k \in \N$ be a natural number. We consider the sequence $n(i, k), i \in \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 \N$ there is an $m \in \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://mathsrv.ku-eichstaett.de/MGF/homes/wirsching/}{\texttt{http://mathsrv.ku-eichstaett.de/MGF/homes/wirsching/}} for more details (and forget this package). }

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

\subsection{\textcolor{Chapter }{ThreeKPlusOneSequence}}
\logpage{[ 1, 2, 1 ]}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ThreeKPlusOneSequence( k[, max] )\index{ThreeKPlusOneSequence@\texttt{ThreeKPlusOneSequence}}
\label{ThreeKPlusOneSequence}
}\hfill{\scriptsize (function)}}\\


 This function computes for a natural number \mbox{\texttt{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{max}}, k)$, if \mbox{\texttt{max}} is given. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> ThreeKPlusOneSequence(101);
  "Sorry, not yet implemented. Wait for Version 84 of the package"
\end{Verbatim}
 }

 }

 }

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

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

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


\printindex

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