That formula seems right, but with 13 weights you won't be able to ensure that both sides of the scale have the same number of weights for all 3 weighings.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.