Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@MaxAlekseyev I don't think that affects the heuristic at all: amongst the primes for which $p - 1$ has a 2-adic valuation of $k$, the proportion of primes $p$ for which $-3$ is a $2^k$th residue is $2^{-k}$ but that's exactly counterbalanced by the fact that for those primes the probability of success is $(2^k)/(p - 1)$.
@IlyaBogdanov In addition to $-3$ being a square $\mod p$, it needs also be a fourth power, eighth power, and so on. This is equivalent to requiring that: $(-3)^r = 1 \mod p$ where we have expressed $p = r 2^k + 1$ with $r$ odd. Moreover, we can apply this test before we've checked that $p$ is prime, as anything that passes this must be a strong probable prime (in the sense of Miller-Rabin) to base $-3$; most composite numbers will be discarded by this test.
I'm not convinced that this answer works as written. The problem is that the integral of $f(x) + g(y)$ over the union of the intended domains of $f$ and $g$ picks up an unwanted contribution from $f$ on the intended domain of $g$, and vice-versa (and this explains the result in the comment by @GeoffreyIrving ). It would work if we could somehow make $f$ identically zero on the domain of $g$ and vice-versa, but it's unclear how to do this whilst keeping everything algebraic (the bump functions that I'm aware of are non-algebraic).
Removing any chain or antichain from the $k$th Richard Stanley poset gives you something that contains an isomorphic copy of the $(k-1)$th Richard Stanley poset. By induction, you need to remove at least $k$ chains/antichains to get down to the empty poset.