Let $A_1, A_2, \ldots, A_n$ be an $n$ -sided regular polygon. If $\frac{1}{A_1 A_2} = \frac{1}{A_1 A_3} + \frac{1}{A_1A_4}$, find $n$.
1. Given that \(A_1, A_2, \ldots, A_n\) is an \(n\)-sided regular polygon, we know that all sides and angles are equal. The polygon is also cyclic, meaning all vertices lie on a common circle.

2. Let \(A_1A_2 = A_2A_3 = A_3A_4 = A_4A_5 = x\), \(A_1A_3 = y\), and \(A_1A_4 = z\). We are given the equation:
   \[
   \frac{1}{A_1A_2} = \frac{1}{A_1A_3} + \frac{1}{A_1A_4}
   \]
   Substituting the given distances, we get:
   \[
   \frac{1}{x} = \frac{1}{y} + \frac{1}{z}
   \]
   Multiplying through by \(xyz\) to clear the denominators, we obtain:
   \[
   yz = zx + xy
   \]

3. By Ptolemy's Theorem, which states that for a cyclic quadrilateral \(ABCD\), the sum of the products of its two pairs of opposite sides is equal to the product of its diagonals, we apply it to quadrilateral \(A_1A_2A_3A_4\):
   \[
   A_1A_3 \cdot A_2A_4 + A_2A_3 \cdot A_1A_4 = A_1A_2 \cdot A_3A_4
   \]
   Substituting the known distances, we get:
   \[
   y \cdot A_2A_4 + x \cdot z = x \cdot x
   \]
   Since \(A_2A_4\) is a diagonal of the regular polygon, we need to express it in terms of \(x\). For a regular polygon, the length of a diagonal \(A_iA_j\) depends on the number of sides \(n\) and the distance between the vertices.

4. Given the equation \(yz = zx + xy\), we can rearrange it to:
   \[
   yz - zx - xy = 0
   \]
   Factoring out \(z\) from the first two terms, we get:
   \[
   z(y - x) = xy
   \]
   Solving for \(z\), we have:
   \[
   z = \frac{xy}{y - x}
   \]

5. To find \(n\), we need to determine the specific relationship between \(x\), \(y\), and \(z\) in a regular polygon. For a regular \(n\)-sided polygon, the length of the diagonals can be expressed using trigonometric functions. Specifically, the length of a diagonal \(A_1A_k\) is given by:
   \[
   A_1A_k = 2R \sin\left(\frac{(k-1)\pi}{n}\right)
   \]
   where \(R\) is the circumradius of the polygon.

6. Using the given equation \(\frac{1}{x} = \frac{1}{y} + \frac{1}{z}\), we substitute the trigonometric expressions for \(x\), \(y\), and \(z\):
   \[
   x = 2R \sin\left(\frac{\pi}{n}\right), \quad y = 2R \sin\left(\frac{2\pi}{n}\right), \quad z = 2R \sin\left(\frac{3\pi}{n}\right)
   \]
   Substituting these into the equation, we get:
   \[
   \frac{1}{2R \sin\left(\frac{\pi}{n}\right)} = \frac{1}{2R \sin\left(\frac{2\pi}{n}\right)} + \frac{1}{2R \sin\left(\frac{3\pi}{n}\right)}
   \]
   Simplifying, we have:
   \[
   \frac{1}{\sin\left(\frac{\pi}{n}\right)} = \frac{1}{\sin\left(\frac{2\pi}{n}\right)} + \frac{1}{\sin\left(\frac{3\pi}{n}\right)}
   \]

7. Solving this equation for \(n\), we find that \(n = 7\) satisfies the equation. Therefore, the polygon has 7 sides.

The final answer is \(\boxed{7}\).