Sometime ago we came across invariant quantities under twisting of all affine algebra. (See the appendix E of http://arxiv.org/abs/hep-th/0403076 .) Choose the convention so that the longest root has length $\sqrt{2}$, and the co-root of a root $\alpha$ is $\alpha^*=2\alpha/\alpha^2$. The lowest negative root $\alpha_0$ is a long root for untwisted affine algebras. The extended Dynkin diagram of untwisted affine algebra $G^{(1)}$ is given by the extended simple roots $\alpha_a, a=0,1,...r$ where $r$ is the rank of $G^{(1)}$. The co-marks $k_a^*$ are such that $k_0^*=1$ and $\sum_{a=0}^r k_a^* \alpha_a^* =0 $. The dual Coxeter number $h=\sum_{a=0}^r k_a^*$. For the corresponding twisted algebra $G^{(L)}$ if it exists, we have dual simple roots $\beta_b, b=0,1,2,...r'$ where $r'$ is the rank of $G^{(L)}$. Twisting parameter $L$ is 2 or 3 at best. We define co-marks $\tilde k_b^*$ as minimal natural numbers such that $\sum_{b=0}^{r'}\tilde k_a^*\beta_a^*=0$. Note that $\tilde k_0^*=1$ except for $A_{2r}^{(2)}$, for which $\tilde k_0^*=2$.

Invariants under twisting are:

1) The Coxeter number defined as $h(G^{(1)})=\sum_{a=0}^r k_a^*$ for the untwisted affine algebra is identical to that of twisted one defined by $h(G^{(L)})=\sum_{b=0}^{r'} \tilde k_b^*$.

2) $1= 2/\alpha_0^2=2\tilde k_0/(L\beta_0^2)$. Here $L$ is the number characterizing twisting.

3) $\prod_{a=0}^r\Big[\frac{k_a^*\alpha_a^2}{2}\Big]^{k_a^*} = \prod_{b=0}^{r'}\Big[\frac{\tilde k_b^*\beta_b^2}{2}\Big]^{\tilde k_b^*} $ . This quantity turns out to be unity for $A_r$.

4) A lot more complicated on related to modular functions. For example with group $A_2$, there are two related modular functions:

(a) $ W_{A_2^{(1)}}({\bf X})= \wp(\alpha_0\cdot {\bf X}) + \wp(\alpha_1\cdot {\bf X} )+\wp(\alpha_2\cdot{\bf X})$ on $C^2$ and (b) $W_{A_2^{(2)}}= \wp(\alpha_0\cdot X) + \wp(\alpha_0\cdot {\bf X}+\pi i)+\wp(\alpha_0\cdot{\bf X}+\pi i \tau)$ on $C$.

Both are good under $SL(2,Z)$ if one allows the shift of ${\bf X}$ for the second one. Two modular functions have many common properties, including their critical points modulo Weyl group.

We can prove first three explicitly, and last one indirectly. For the last invariant two, have they appeared in anywhere before or after? If so, how? In our case, the reason for these invariants is the invariance of the vacuum structure of $N=1^*$ supersymmetric Yang-Mills theories on $R^{1+2}\times S^1$ under twisting.