Benford’s law, which predicts the distribution of leading digits, can be exact for powers of 2.The proportion of powers of 2 that begin with the digit 1 is given by Benford’s law with d = 1, rounded down.In Python code, the number of times 2^n begins with 1 can be exactly calculated using Benford’s law.Benford’s law is not exact for other digits, but it is for 1 and 4 when applied to powers of 2.