Artificial intelligent assistant

Find the total number of Chair in the hall In a School hall, $\frac{7}{31}$ of the chairs are arranged in rows of 5, and $\frac{11}{31}$ of the chairs are arranged in rows of 13. The rest of the chairs are stacked up. If there are less than 4000 chairs in the hall, find the total number of chairs in the hall.

There are $2015$ chairs in the hall. Let the number of chairs be $x$. Then there are $\frac{7}{31}x$ chairs arranged in rows of $5$. Since this is a whole number of chairs, $x$ must be divisible by $31$. Also since $\frac{7}{31}x$ must be divisible by 5, $x$ has to be divisible by $5$ (because $7$ is not divisible by $5$). Similarly, we know that $\frac{11}{31}x$ chairs are arranged in rows of $13$. So $x$ has to be divisible by $13$, since $\frac{11}{31}x$ is divisible by $13$ and $11$ and $13$ do not share common factors.

We know $x$ is divisible by $31$, $5$ and $13$. So $x$ is divisible by the product $31 \cdot 5 \cdot 13 = 2015$. Since there are at most $4000$ chairs in the hall, any multiple of $2015$ would be too many chairs. So the solution is $x = 2015$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 87fc9425cd4a301dd4ffc904f6cef9df