initial commit

This commit is contained in:
2025-08-03 20:16:55 -07:00
commit 87a130499d
89 changed files with 10241 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
module _55
open System.Numerics
let lynchrels =
let isLynchrel n =
let revInt (n:bigint) =
n
|> (string)
|> common.revString
|> (fun s -> BigInteger.TryParse(s) |> snd)
let rec isLynchrelRec (n:bigint,d) =
match (n + (revInt n)), d with
| _,0 -> true
| n,_ when ((string) >> common.isPalindrome) n -> false
| n,d -> isLynchrelRec (n, d-1)
isLynchrelRec (n,50)
[|1I..10000I|]
|> Array.filter isLynchrel
|> Array.length