Replace i in k <= i with (2 * i) - 1, so that the expression would be k <= (2 * i) - 1.
i
k <= i
(2 * i) - 1
k <= (2 * i) - 1