Therefore,

Further, for the simplest mode of vibration, at the two ends of the string, there are nodes and in between the two nodes is an antinode. Therefore, l = l/2 or λ = 2l, hence n = λ/2l

If the string vibrates in p segments, the λ = p l/2 or λ = 2l/p. Then n = (p/2l)
.