If v is the speed of sound in air then the shortest length of the closed pipe which resonates to a frequency n
v4n
v2n
2nv
4nv
For shortest length of pipe mode of vibration must be fundamental i.e., n=v4l⇒l=v4n.