Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
// Cyclop numbers. Nigel Galloway: June 25th., 2021
let rec fG n g=seq{yield! g|>Seq.collect(fun i->g|>Seq.map(fun g->n*i+g)); yield! fG(n*10)(fN g)}
let cyclops=seq{yield 0; yield! fG 100 [1..9]}
let primeCyclops,blindCyclops=cyclops|>Seq.filter isPrime,Seq.zip(fG 100 [1..9])(fG 10 [1..9])|>Seq.filter(fun(n,g)->isPrime n && isPrime g)|>Seq.map fst
let palindromicCyclops=let fN g=let rec fN g=[yield g%10; if g>9 then yield! fN(g/10)] in let n=fN g in n=List.rev n in primeCyclops|>Seq.filter fN

View file

@ -0,0 +1 @@
cyclops|>Seq.take 50|>Seq.iter(printf "%d "); printfn ""

View file

@ -0,0 +1 @@
primeCyclops|>Seq.take 50|>Seq.iter(printf "%d "); printfn ""

View file

@ -0,0 +1 @@
blindCyclops|>Seq.take 50|>Seq.iter(printf "%d "); printfn ""

View file

@ -0,0 +1 @@
palindromicCyclops|>Seq.take 50|>Seq.iter(printf "%d "); printfn ""

View file

@ -0,0 +1 @@
let n=cyclops|>Seq.findIndex(fun n->n>10000000) in printfn "First Cyclop number > 10,000,000 is %d at index %d" (Seq.item n (cyclops)) n

View file

@ -0,0 +1 @@
let n=primeCyclops|>Seq.findIndex(fun n->n>10000000) in printfn "First prime Cyclop number > 10,000,000 is %d at index %d" (Seq.item n (primeCyclops)) n

View file

@ -0,0 +1 @@
let n=blindCyclops|>Seq.findIndex(fun n->n>10000000) in printfn "First blind Cyclop number > 10,000,000 is %d at index %d" (Seq.item n (blindCyclops)) n

View file

@ -0,0 +1 @@
let n=palindromicCyclops|>Seq.findIndex(fun n->n>10000000) in printfn "First palindromic prime Cyclop number > 10,000,000 is %d at index %d" (Seq.item n (palindromicCyclops)) n