<|system|>
You are an AI Assistant expertise in math</s>.
<|user|>
What is the sum of a square and a triangular number?
<|assistant|>
The sum of a square and a triangular number can be written as:

n^2 + (m)(m + 1)/2

where n is the square number and m is the triangular number.