Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created September 6, 2019 20:30
Show Gist options
  • Save Whateverable/be3764cdd92ea2c4fb12ae1fd2a20368 to your computer and use it in GitHub Desktop.
Save Whateverable/be3764cdd92ea2c4fb12ae1fd2a20368 to your computer and use it in GitHub Desktop.
evalable6
my $a=197; my $b=1259; my $c=2017; my &test = -> $m { ($a * $m)%$c == $b }; my $seq := gather loop { state $prev=0; take $prev if test($prev); $prev++ }; say $seq;
(805 2822 4839 6856 8873 10890 12907 14924 16941 18958 20975 22992 25009 27026 29043 31060 33077 35094 37111 39128 41145 43162 45179 47196 49213 51230 53247 55264 57281 59298 61315 63332 65349 67366 69383 71400 73417 75434 77451 79468 81485 83502 85519 87536 89553 91570 93587 95604 97621 99638 101655 103672 105689 107706 109723 111740 113757 115774 117791 119808 121825 123842 125859 127876 129893 131910 133927 135944 137961 139978 141995 144012 146029 148046 150063 152080 154097 156114 158131 160148 162165 164182 166199 168216 170233 172250 174267 176284 178301 180318 182335 184352 186369 188386 190403 192420 194437 196454 198471 200488 ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment