I believe it should be that v is in the range of [0, 2^n), not [0, n). Compare with this diagram: https://camo.githubusercontent.com/28157e79817085bd5ba6ad81acf962948cb8129b8cf66c369a255def50914681/68747470733a2f2f646f632e64616c656b2e72732f6173736574732f62756c6c657470726f6f66732d72616e676570726f6f662e706e67
I believe it should be that v is in the range of [0, 2^n), not [0, n).
Compare with this diagram: https://camo.githubusercontent.com/28157e79817085bd5ba6ad81acf962948cb8129b8cf66c369a255def50914681/68747470733a2f2f646f632e64616c656b2e72732f6173736574732f62756c6c657470726f6f66732d72616e676570726f6f662e706e67