Question 967412
i don't know if there's a formula to find this.
you can try several numbers and iterate to get the answer.
the number of friends will be x, where x! = 5040.
try 5! to get 120
try 6! to get 720
try 12! to get 479001600 which is way too big.
try 9! to get 3628880 which is still too big.
it whould be 7 or 8.
try 7! to get 720 * 7 = 5040.


the number is 7 because 7! = 5040.


the easy way was to work up.


1! = 1
2! = 2
3! = 2! * 3 = 2*3 = 6
4! = 3! * 4 = 6 * 4 = 24
5! = 4! * 5 = 24 * 5 = 120
6! = 5! * 6 = 120 * 6 = 720
7! = 6! * 7 = 720 * 7 = 5040


you did have to know that the number of different arrangements of x people is x!.


but once you knew that, the rest was just working through the numbers.


a calculator that does factorials is helpful.


it takes the drudgery out of the calculations.