\documentstyle{report}

\pagestyle{myheadings}
\def\headlineaux{\sc Math 609/597: Cryptography
\hrulefill
}
\markboth{\headlineaux}{\headlineaux}

\setlength{\textwidth}{6.25in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}

\begin{document}
\begin{titlepage}\begin{centerline}{\Huge \framebox{Burt Rosenberg}}
\end{centerline}\end{titlepage}

\begin{verbatim}
#!/usr/local/bin/perl

$MOD1 = 11 ;
$MOD2 = 7 ;

$mod1_star = 1 ;
while ( ($MOD1*$mod1_star)%$MOD2!=1 )
{ $mod1_star++ ; }
$mod1_star *= $MOD1 ;

$mod2_star = 1 ;
while ( ($MOD2*$mod2_star)%$MOD1!=1 )
{ $mod2_star++ ; }
$mod2_star *= $MOD2 ;

$j1 = 1 ;
$j2 = 1 ;
for ($i=0;$i<=(($MOD1-1)/2*($MOD2-1));$i++ )
{
   $k = ($j1*$mod2_star + $j2*$mod1_star) % ($MOD1*$MOD2) ;
   printf "%4d %4d %4d\n", $j1, $j2, $k ;
   $j1 = (2*$j1)%$MOD1 ;
   $j2 = (3*$j2)%$MOD2 ;
}

passaic> example.pl
   1    1    1
   2    3   24
   4    2   37
   8    6   41
   5    4   60
  10    5   54
   9    1   64
   7    3   73
   3    2   58
   6    6    6
   1    4   67
   2    5   68
   4    1   15
   8    3   52
   5    2   16
  10    6   76
   9    4   53
   7    5   40
   3    1   36
   6    3   17
   1    2   23
   2    6   13
   4    4    4
   8    5   19
   5    1   71
  10    3   10
   9    2    9
   7    6   62
   3    4   25
   6    5   61
   1    1    1
passaic>

\end{verbatim}
\end{document}
