Help for this page
f(x) = (a*x + b) % m
sub gcd { $_[1] ? gcd($_[1], $_[0] % $_[1]) : $_[0] } ... my @result = map shuffle($seed, 15, $_), 0 .. 14; print "seed=$seed ==> @result\n"; }
seed=1 ==> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 seed=2 ==> 0 2 4 6 8 10 12 14 1 3 5 7 9 11 13 ... seed=8 ==> 0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 seed=9 ==> 1 9 2 10 3 11 4 12 5 13 6 14 7 0 8 seed=10 ==> 2 10 3 11 4 12 5 13 6 14 7 0 8 1 9