If a vector r=xi^+yj^+zk^, makes angle π3,π3 and πn with X-axis, Y-axis and Z-axis respectively. The value of n is _______.
cos2α+cos2β+cos2γ=1 or cos260∘+cos260∘+cos2γ=1 or 14+14+cos2γ=1 or cos2γ=1−12=12 or cosγ=12⇒γ=π4 ∴ n=4