Catch rate/Capture method (Generation III-IV)/Shake probability

The shake probability is calculated as follows:

b = 1048560 / sqrt(sqrt(16711680/a))

The divisions and square roots all round down to the nearest integer.