Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
4
Task/Thue-Morse/F-Sharp/thue-morse.fs
Normal file
4
Task/Thue-Morse/F-Sharp/thue-morse.fs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// Thue-Morse. Nigel Galloway: April 16th., 2024
|
||||
let rec fG n g=match n with 0->g |1->g+1 |n ->fG(n/2)(g+n&&&1)
|
||||
let thueMorse=Seq.initInfinite(fun n->(fG n 0)%2)
|
||||
thueMorse|>Seq.take 25|>Seq.iter(printf "%d "); printfn ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue