  Let $\Bbb Z$ and $\Bbb N$ be the set of integers and the set of positive
integers, respectively. For $a,b,c,d,n\in\Bbb N$ let $N(a,b,c,d;n)$ be the
number of representations of $n$ by $ax^2+by^2+cz^2+dw^2$, and let
$t(a,b,c,d;n)$ be the number of representations of $n$ by
$ax(x-1)/2+by(y-1)/2+cz(z-1)/2
  +dw(w-1)/2$ $(x,y,z,w\in\Bbb Z$). In this paper we reveal the connections
between $t(a,b,c,d;n)$ and $N(a,b,c,d;n)$. Suppose $a,n\in\Bbb N$ and $2\nmid
a$. We show that $$t(a,b,c,d;n)=\frac
23N(a,b,c,d;8n+a+b+c+d)-2N(a,b,c,d;2n+(a+b+c+d)/4)$$ for $(a,b,c,d)=
(a,a,2a,8m),\ (a,3a,8k+2,8m+6),\ (a,3a,8m+4,8m+4)\ (n\equiv m+\frac{a-1}2 \pmod
2)$ and $(a,3a,16k+4,16m+4)\ (n\equiv \frac{a-1}2\pmod 2)$. We also obtain
explicit formulas for $t(a,b,c,d;n)$ in the cases $(a,b,c,d)=(1,1,2,8),\
(1,1,2,16),(1,2,3,6),\ (1,3,4,12),\ (1,1,$ $3,4),\ (1,1,5,5),\ (1,5,5,5),\
(1,3,3,12),\ (1,1,1,12),\ (1,1,3,12)$ and $(1,3,3,4)$.
