  Let m_{n} and m_{n-1} be an n mean and an n-1 mean, respectively, n\geq3. If
x=(x_{1},...,x_{n}), let {\pi}_{\neqj}x=(x_{1},...,x_{j-1},x_{j+1},...,x_{n}).
m_{n-1} and m_{n} are said to form a type 1 invariant pair if
m_{n}(m_{n-1}({\pi}_{\neq1}x),m_{n-1}({\pi}_{\neq2}x),...,m_{n-1}({\pi}_{\neqn}x))=m_{n}(x)
for all x\inR^{n}. m_{n-1} and m_{n} are said to form a type 2 invariant pair
if m_{n}(x,m_{n-1}(x))=m_{n-1}(x) for all x\inR_{+}^{n-1}. If
x=(x_{1},...,x_{n-1}), let
{\pi}_{=j}x=(x_{1},...,x_{j-1},x_{j},x_{j},x_{j+1},...,x_{n-1})\inR_{+}^{n}.
m_{n-1} and m_{n} are said to form a type 3 invariant pair if
m_{n-1}(m_{n}({\pi}=_{1}x),...,m_{n}({\pi}_{=n-1}x))=m_{n-1}(x) for all
x\inR_{+}^{n-1}. Let
m_{h,w,n}(a_{1},...,a_{n})=h^{-1}(((\sum_{k=1}^{n}w(a_{k})h(a_{k}))/(\sum_{k=1}^{n}w(a_{k})))),
where h(x) is continuous and monotone, and w(x) is continuous and positive, on
(0,\infty) denote the family of weighted quasi--arithmetic means in n
variables. We prove that if m_{h,w,n} and m_{h,w,n-1} form a type 1 or type 3
invariant pair, then m_{h,w,n} and m_{h,w,n-1} are quasi--arithmetic means. The
method of proof involves deriving equations for certain partial derivatives of
order 3 of m_{h,w,n} on the diagonal of R_{+}^{n}. The proof also requires an
equation relating certain partial derivatives of order 3 for type 1 or type 3
invariant pairs of means. We also show that any pair of weighted
quasi--arithmetic means m_{h,w,n} and m_{h,w,n-1} form a type 2 invariant pair.
