For any positive integer $n>1$, let $p(n)$ be the greatest prime factor of $n$. Find all the triplets of distinct positive integers $(x,y,z)$ which satisfy the following properties: $x,y$ and $z$ form an arithmetic progression, and $p(xyz)\leq 3.$
To solve the problem, we need to find all triplets of distinct positive integers \((x, y, z)\) that form an arithmetic progression and satisfy \(p(xyz) \leq 3\). This means that the prime factors of \(x, y,\) and \(z\) can only be 2 or 3.

1. **Prime Factor Condition**:
   Since \(p(xyz) \leq 3\), the numbers \(x, y,\) and \(z\) can only have prime factors 2 and 3. Therefore, we can write:
   \[
   x = 2^a 3^b, \quad y = 2^c 3^d, \quad z = 2^e 3^f
   \]
   where \(a, b, c, d, e, f\) are non-negative integers.

2. **Arithmetic Progression Condition**:
   Since \(x, y,\) and \(z\) form an arithmetic progression, we have:
   \[
   y - x = z - y \implies 2y = x + z \implies y = \frac{x + z}{2}
   \]
   This implies that \(x + z\) must be even.

3. **Case Analysis**:
   We will consider different cases based on the divisibility by 3.

   **Case 1: Two of \(x, y, z\) are divisible by 3**:
   - If two of \(x, y, z\) are divisible by 3, then the third one must also be divisible by 3, otherwise, the common difference \(d\) would not be an integer. This leads to a contradiction because \(x, y, z\) would not be distinct.

   **Case 2: One of \(x, y, z\) is divisible by 3**:
   - **Subcase 2.1: \(3 \mid x\)**:
     Let \(x = 3^a 2^b\), \(y = 2^p\), \(z = 2^q\). Since they form an arithmetic sequence:
     \[
     z - y = y - x \implies 2^q - 2^p = 2^p - 3^a 2^b \implies 2^{p+1} = 2^q + 3^a 2^b
     \]
     This implies \(b = p + 1\), but \(x = 3^a 2^{p+1} > y = 2^p\), which contradicts \(x < y < z\).

   - **Subcase 2.2: \(3 \mid y\)**:
     Let \(x = 2^b\), \(y = 2^p 3^q\), \(z = 2^n\). Since they form an arithmetic sequence:
     \[
     2^{p+1} 3^q = 2^n + 2^b \implies 2^{p+1} 3^q = 2^b (2^{n-b} + 1)
     \]
     This implies \(p + 1 = b\), which contradicts \(\gcd(x, y, z) = 1\) since \(b < n\) if \(p > 0\). Hence, \(p = 0\), which gives \(b = 1\). Thus:
     \[
     3^q = 2^{n-1} + 1
     \]
     By Fermat's Little Theorem, \(2^x \equiv -1 \mod 3\) if \(x = 2k + 1\), meaning \(n + 1\) is odd. By Zsigmondy's theorem, there is some prime \(p\) such that \(p \mid 2^{2k+1} + 1\) but \(p \nmid (2 + 1)\), which gives another prime factor for RHS. This theorem does not hold for \(2^3 + 1\) or exponent is 1. Hence \(n = 4\), giving the triplet \((2, 9, 16)\).

   - **Subcase 2.3: \(3 \mid z\)**:
     Let \(x = 2^b\), \(y = 2^p\), \(z = 2^n 3^m\). Since they form an arithmetic sequence:
     \[
     2^{p+1} = 2^b (2^{n-b} 3^m + 1)
     \]
     This implies \(p + 1 = b\) if \(b \neq 0\), which contradicts \(x < y < z\). Hence \(b = 0\), giving:
     \[
     2^{p+1} = 2^n 3^m + 1
     \]
     Since \(m > 0\), we must have \(n = 0\), hence \(2^{p+1} - 1 = 3^m\). By Fermat's Little Theorem, \(p + 1\) is even, and using Zsigmondy's theorem, we get a contradiction unless \(p + 1 = 2\), giving the solution \((1, 2, 3)\).

   **Case 3: None of \(x, y, z\) are divisible by 3**:
   - This implies \(x = 1, y = 2^a, z = 2^b\), which gives trivial contradictions.

4. **Conclusion**:
   The solutions are:
   \[
   \boxed{(x, y, z) = (l, 2l, 3l), (2l, 3l, 4l), (2l, 9l, 16l)}
   \]
   where \(l = 2^a 3^b\).