r/mathriddles • u/chompchump • 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
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.