-
Notifications
You must be signed in to change notification settings - Fork 11
/
L18
40 lines (33 loc) · 3.03 KB
/
L18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
offsets = [0,3,5,7,9,11,15,17,33,35,39,45,47,53,57,59,63,75,77,83,87,89,95,99,105,113,117,119,125,129,143,147,153,155,165,173,179,183,189,195,197,209,215,243,249,255]
moduli :: [Integer]
moduli = map (2^64-) offsets
l18 = [1,63690581,44701699729693429,15332091188757329557096929,4940390007166855988604029802787401,1595505507686882715749002172414020741857729,515636677864163219524895211053049897531811801250821,166650920257024423462011294123136976471812572057940449253441,53860511232216228878845000028552928369632487096643854242441769229265,17407361950309381558491909847176225713327003640745414506101469276989824040893,5625944437839316725417034733484676655060046437494303568101196911011250778734538370313,1818268101063397348407524320338136087085311490583296300831347748142859813828927874950019600689,587652246754347739368657083786586921998972008934930695194600937915164703102566384006494100112174487205,189925326693899656453203047332679694920317003062440222340200761360400797080262175961405709113356773889177857525,61382611772199274334636269175293250152967293943474157074284463810371864197832046374971583974267484965949417106776293161,19838454899952826417949292466806306458168271646619328408135679476232634284924466314674347155249080739678632648220810574456275957,6411657657677713565232032263939927344282021848723432281335590691938564423567053274675106473315771865205000065292204622856107114049580445,2072205427619023303039587520236390121754274072718784609433998196933282608067036314403465202963700297341152216286750576593627459392979397487964077]
main = do
(idx:_) <- getArgs
let i = read idx :: Int
mapM_ (print . (`mod` moduli!!i)) l18
1: L(18,18) mod 18446744073709551613 = 16186845773463447566
2: L(18,18) mod 18446744073709551611 = 12136539386579649205
3: L(18,18) mod 18446744073709551609 = 9654681154063043813
4: L(18,18) mod 18446744073709551607 = 14266418555372504331
5: L(18,18) mod 18446744073709551605 = 9526046362458239738
6: L(18,18) mod 18446744073709551601 = 10096428208005934494
7: L(18,18) mod 18446744073709551599 = 10889935252012143255
8: L(18,18) mod 18446744073709551583 = 7845873890545065206
18446744073709551613 16186845773463447566
18446744073709551611 12136539386579649205
18446744073709551609 9654681154063043813
18446744073709551607 14266418555372504331
18446744073709551605 9526046362458239738
18446744073709551601 10096428208005934494
18446744073709551599 10889935252012143255
18446744073709551583 7845873890545065206
669723114288829212892740188841706543509937780640178732810318337696945624428547218105214326012774371397184848890970111836283470468812827907149926502347633
1: L(19,18) mod 18446744073709551613 = 2600138724325818197
2: L(19,18) mod 18446744073709551611 = 16062343393456414008
3: L(19,18) mod 18446744073709551609 = 17414879468215163979
4: L(19,18) mod 18446744073709551607 = 4828950901214431126
5: L(19,18) mod 18446744073709551605 = 4129598442112794508
6: L(19,18) mod 18446744073709551601 = 4754850718111575974
7: L(19,18) mod 18446744073709551599 = 8858813277674243260
8: L(19,18) mod 18446744073709551583 = 11863145952786430350