Expressing an integer as the sum of triangular numbers
Problem 621
Gauss famously proved that every positive integer can be expressed as the sum of three triangular numbers (including 0 as the lowest triangular number). In fact most numbers can be expressed as a sum of three triangular numbers in several ways.
Let be the number of ways of expressing as the sum of three triangular numbers, regarding different arrangements of the terms of the sum as distinct.
For example, , as 9 can be expressed as: 3+3+3, 0+3+6, 0+6+3, 3+0+6, 3+6+0, 6+0+3, 6+3+0.
You are given and .
You are given and .
Find .