<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/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&lt;=(($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 ;
}
</pre></body></html>