Help for this page
for (($m,$n,$r)=@ARGV, $jl=[1..$n]; @$jl>$r; shift @$jl){ push(@$jl,shift @$jl) for (1 .. $m) } print "avoid positions " , join(" ", @$jl) . "\n";
sub joe {$n=$_[0];($n==1)? 1:(($n % 2)? 2*joe(($n - 1)/2)+1:2*joe($n/2 +)- 1)} print "v2: use position " . joe($n) . "\n";