You can get rid of mutation and further simplify your implementation:
let sender () =
let randomString = randomChars 8
let counter = Seq.initInfinite ((+) 1)
|> Seq.take 2000000 //limit so it does not run forever
|> Seq.pick (fun index -> if compute index randomString then Some index else None)
printfn "FINAL COUNT %i " counter
printfn "HASH %s" (header counter randomString)
and compute
:
let compute index randomString =
getHash (header index randomString) |> checkHash
Thank you!