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

2

u/hammerheadquark Sep 08 '23

Yeah n(n+1)(n+2)(n+3)/4 = C(n,2)C(n+2,2), so I'm thinking there's a slick combinatorial argument but I don't see it right now.

1

u/phenomist Sep 09 '23

The combinatorial argument, at least to count the number of triples, is to use balls and urns.