Data update
This commit is contained in:
parent
796d366b97
commit
35bcdeebf8
504 changed files with 7045 additions and 610 deletions
|
|
@ -9,9 +9,9 @@ let is_deceptive n =
|
|||
let rec loop x =
|
||||
x * x <= n && (n mod x = 0 || n mod (x + 4) = 0 || loop (x + 6))
|
||||
in
|
||||
n land 1 <> 0 && n mod 3 <> 0 && n mod 5 <> 0 && loop 7 &&
|
||||
modpow n 10 (pred n) = 1
|
||||
n land 1 <> 0 && n mod 3 <> 0 && n mod 5 <> 0 &&
|
||||
modpow n 10 (pred n) = 1 && loop 7
|
||||
|
||||
let () =
|
||||
Seq.(ints 49 |> filter is_deceptive |> take 500
|
||||
Seq.(ints 49 |> filter is_deceptive |> take 100
|
||||
|> iter (Printf.printf " %u%!")) |> print_newline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue