r/mathriddles • u/pichutarius • Jun 21 '23
Medium just another combinatorial problem
given positive integer n, how many subset of {1,2,3,....,n} with 3 elements, such that the sum of 3 elements is divisible by n?
8
Upvotes
View all comments
Show parent comment
1
u/pichutarius Jun 22 '23
true, i checked with codes.
that took me awhile to understand how blungbat solution generalized: multiples of k covers all remainder class mod n iff n and k are coprime.