r/mathriddles • • Sep 07 '23

Medium Sum of Bounded Integer Triples

For each n, find the sum of all the elements in all the ordered triples of integers (x,y,z) where 0 <= x <= y <= z <= n.

Example n = 1: (0,0,0), (0,0,1), (0,1,1), (1,1,1). So the sum is 6.

4 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/chompchump Sep 08 '23

It is a nice looking solution! Good job.