A338772 The number of different probabilities p for which a coin that lands heads with probability p can, using n flips, perfectly model one flip of a fair coin.
Examples
For n = 2 the a(2) = 3 different values of p are, in increasing order: 1 - sqrt(1/2), which can model a fair flip with the partition (HH, HT, TH), (TT); 1/2, which can model a fair flip with the partition (HH, HT), (TH, TT) (i.e., by ignoring the second flip); and sqrt(1/2), which can model a fair flip with the partition (HH), (HT, TH, TT).
Links
- Zach Wissner-Gross, Can You Make An Unfair Coin Fair?
Programs
-
SageMath
P.
= QQ[] def polystream(nn, pol=P(0), kk=0): if kk >= nn: yield pol - 1 else: for ii in sxrange(binomial(nn, kk) + 1): for xx in polystream(nn, pol + 2 * ii * p^kk * (1-p)^(nn-kk), kk + 1): yield xx def calculate(nn): solutions = Set() for pol in polystream(nn): rootlist = [xx[0] for xx in pol.roots(ring=QQbar)] for root in rootlist: if root.real() == root and 0 <= root <= 1: solutions += Set([root]) return len(solutions)
Comments