Problem 621
Expressing an integer as the sum of triangular numbers
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 $G(n)$ be the number of ways of expressing $n$ as the sum of three triangular numbers, regarding different arrangements of the terms of the sum as distinct.
For example, $G(9)=7$, 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 $G(1000)=78$ and $G(10^6)=2106$.
Find $G(17526\times10^9)$.
将整数表示为三角形数的和
众所周知高斯证明了任意正整数可以被表示为三个三角形数的和(包括0这一最小的三角形数)。事实上大多数整数可以以多种方式被表示为三个三角形数的和。
记$G(n)$为将$n$表示为三个三角形数的方式数目,不同的排列视为不同的方式。
例如,$G(9)=7$,因为9可以被表示成:3+3+3,0+3+6,0+6+3,3+0+6,3+6+0,6+0+3,6+3+0。
已知$G(1000)=78$以及$G(10^6)=2106$。
求$G(17526\times10^9)$。