Because in this case k starts with 0, which means if the k value satisfies k<2*i-1, the command below will excute. You may need to know that k itself has no relation to the number of *, however, it is the number of k that satisfying the formula matters.