I have to count these for class

There are 18 padded chairs around a circular table, and the chairs are numbered from 1 through 18 . How many ways can five people take their seats, so that no two people are adjacent?

Guest Mar 11, 2023

#1**0 **

n=18;r=5;k=1; a=n * (n - (r*k) - 1) nPr (r - 1)

/* where k stands for minmum chair separation between any 2 persons */

/* and k<=[n - r] / r and n=number of chairs, r=number of people to be seated */

/* and k=1 or number of chairs 2 people must be separated by.*/

**Output: 213,840 ways of seating 5 people.**

Guest Mar 11, 2023