Joint distribution for number of crossings and longest run in independent Bernoulli observations. The R package crossrun
Wentzel-Larsen, T., & Anhøj, J. (2019). Joint distribution for number of crossings and longest run in independent Bernoulli observations. The R package crossrun. PLOS ONE, 14(10). doi:10.1371/journal.pone.0223233