TOPICS
Search

Square-Triangle Theorem


The square-triangle theorem states that any nonnegative integer can be represented as the sum of a square, an even square, and a triangular number (Sun 2005), i.e.,

 n=x^2+(2y)^2+1/2z(z+1)
(1)

for x, y, and z integers. For example,

11=1+4+6
(2)
34=9+4+21,
(3)

corresponding to the solutions (x,y,z)=(1,1,3) and (3,1,6), respectively.

Values of n lacking a representation in which all of x, y, and z all are nonzero are 1, 2, 3, 4, 7, 10, 12, 22, and 24 (OEIS A118426).

The following table gives solutions for the first few n.

nsolutions (x,y,z)
1(-1,0,-1), (-1,0,0), (0,0,-2), (0,0,1), (1,0,-1), (1,0,0)
2(-1,0,-2), (-1,0,1), (1,0,-2), (1,0,1)
3(0,0,-3), (0,0,2)
4(2,0,-1), (0,1,0), (-2,0,-1), (1,0,-3), (-2,0,0), (1,0,2), (-1,0,-3), (0,-1,-1), (2,0,0), (0,-1,0)
5(1,-1,-1), (0,-1,1), (-2,0,-2), (0,1,-2), (-1,-1,-1), (-2,0,1), (-1,1,0), (1,1,-1), (2,0,-2), (-1,1,-1)
6(-1,-1,-2), (-1,-1,1), (-1,1,-2), (-1,1,1), (0,0,-4), (0,0,3), (1,-1,-2), (1,-1,1), (1,1,-2), (1,1,1)
7(2,0,-3), (0,1,2), (-2,0,-3), (1,0,-4), (-2,0,2), (1,0,3), (-1,0,-4), (0,-1,-3), (2,0,2), (0,-1,2)
8(1,1,-3), (-1,1,2), (-2,-1,-1), (1,-1,-3), (-2,1,-1), (-2,-1,0), (-1,-1,2), (2,-1,-1), (2,1,-1), (-1,-1,-3)
9(3,0,-1), (2,-1,1), (-3,0,-1), (2,1,-2), (-3,0,0), (2,1,1), (-2,-1,-2), (-2,1,-2), (3,0,0), (-2,1,1)
10(2,0,-4), (0,0,4), (-3,0,-2), (0,1,-4), (-2,0,-4), (-3,0,1), (0,1,3), (0,0,-5), (3,0,1), (2,0,3)

The numbers of solutions for n=1, 2, ... are 6, 4, 2, 12, 16, 10, 12, 16, 12, 14, 20, 4, 8, 24, 14, ... (OEIS A118421). The high-water marks are 6, 12, 16, 20, 24, 28, 32, 40, 44, 56, 60, 72, 80, 88, 96, 108, ... (OEIS A118422), which occur for n=1, 4, 5, 11, 14, 19, 20, 23, 26, 41, 53, 68, 86, 110, 145, ... (OEIS A118423).


See also

Euler's Conjecture, Waring's Problem

Explore with Wolfram|Alpha

References

Sloane, N. J. A. Sequences A118421, A118422, A118422, and A118426 in "The On-Line Encyclopedia of Integer Sequences."Sun, Z.-W. "Each Natural Number is of the Form x^2+(2y)^2+z(z+1)/2." 9 May 2005. http://arxiv.org/abs/math/0505128.

Referenced on Wolfram|Alpha

Square-Triangle Theorem

Cite this as:

Weisstein, Eric W. "Square-Triangle Theorem." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Square-TriangleTheorem.html

Subject classifications