A representation of $n$ as a sum of three triangular numbers is equivalent to representing $8n+3$ as a sum of three odd squares. The question of computing representations as a sum of three squares has been much discussed here, see http://mathoverflow.net/questions/104322/efficient-computation-of-integer-representation-as-sum-of-three-squares