Let z1 and z2 be nth roots of unity which subtend a right angle at the origin. Then n must be of the form
⇒ei(k1−k2)2πn=ei(π2)
Hence,
(k1−k2)2πn=π2
⇒k1−k2=n4
As k1,k2 are integers, n must be of the form 4k