Let $A$ be an $n\times n$ orthogonal matrix such that $\sum_{k=1}^na_{ik}^3a_{jk}=\sum_{k=1}^na_{jk}^3a_{ik}$ for every $1\le i,j\le n$.

Original question which is solved by a counterexample given (For the new question see Edit 2): I want to show that $A$ is either a permutation matrix (i.e., all but one entry in each row and column is zero, and that non-zero entry is $1$ or $-1$), or all entries of $A$ have absolute value $1/\sqrt n$.

This question happens in my calculation on some functions from the tangent space of $A$.

I will provide a proof of $n=2$ without using the $\sin$ & $\cos$ representation of $A$:

$a_{11}^3a_{21}+a_{12}^3a_{22}=a_{11}a_{21}^3+a_{12}a_{22}^3$, so $a_{11}a_{21}(a_{11}^2-a_{21}^2)=a_{12}a_{22}(a_{22}^2-a_{12}^2)$. Since they are unit vectors, $a_{11}^2-a_{21}^2=a_{22}^2-a_{12}^2$, so it's easy to deduce the desired result. However, I find it hard to generalize this method.

Any suggestions will be appreciated.

Edit: Ok let's add the condition that $\sum_{k=1}^na_{ki}^3a_{kj}=\sum_{k=1}^na_{kj}^3a_{ki}$ for every $1\le i,j\le n$. I have proved that this must be true from the assumptions.

Edit 2: the comment gives a counterexample of this. As Ilya Bogdanov suggested, it is true that if $A$ is irreducible, then each non-zero entry of $A$ has the same absolute value?

3more comments