Let $n,k$ are integers and $p$ is a prime number. Find all $(n,k,p)$ such that
$|6n^2-17n-39|=p^k$
Given the equation:
\[ |6n^2 - 17n - 39| = p^k \]
we can factorize the quadratic expression:
\[ 6n^2 - 17n - 39 = (2n + 3)(3n - 13) \]
Thus, we have:
\[ |(2n + 3)(3n - 13)| = p^k \]

We need to find all integer solutions \((n, k, p)\) where \(p\) is a prime number. We will consider different cases based on the values of \(|2n + 3|\) and \(|3n - 13|\).

1. **Case 1: \(\alpha = 0\)**
   - If \(|2n + 3| = 1\), then:
     \[ 2n + 3 = \pm 1 \]
     - For \(2n + 3 = 1\):
       \[ 2n = -2 \implies n = -1 \]
       Substituting \(n = -1\) into \(|6n^2 - 17n - 39|\):
       \[ |6(-1)^2 - 17(-1) - 39| = |6 + 17 - 39| = |-16| = 16 \]
       Since \(16 = 2^4\), we have \(p = 2\) and \(k = 4\).

     - For \(2n + 3 = -1\):
       \[ 2n = -4 \implies n = -2 \]
       Substituting \(n = -2\) into \(|6n^2 - 17n - 39|\):
       \[ |6(-2)^2 - 17(-2) - 39| = |24 + 34 - 39| = |19| = 19 \]
       Since \(19\) is a prime number, we have \(p = 19\) and \(k = 1\).

2. **Case 2: \(\beta = 0\)**
   - If \(|3n - 13| = 1\), then:
     \[ 3n - 13 = \pm 1 \]
     - For \(3n - 13 = 1\):
       \[ 3n = 14 \implies n = \frac{14}{3} \]
       This is not an integer, so it is not a valid solution.

     - For \(3n - 13 = -1\):
       \[ 3n = 12 \implies n = 4 \]
       Substituting \(n = 4\) into \(|6n^2 - 17n - 39|\):
       \[ |6(4)^2 - 17(4) - 39| = |96 - 68 - 39| = |-11| = 11 \]
       Since \(11\) is a prime number, we have \(p = 11\) and \(k = 1\).

3. **Case 3: \(\alpha \geq \beta\)**
   - If \(\alpha \geq \beta\), then \(|3n - 13|\) divides \(|2n + 3|\):
     \[ 3n - 13 \mid 2n + 3 \]
     \[ 3n - 13 \mid 3(2n + 3) - 2(3n - 13) \]
     \[ 3n - 13 \mid 9n + 9 - 6n + 26 \]
     \[ 3n - 13 \mid 3n + 35 \]
     \[ 3n - 13 \mid 35 \]
     The divisors of 35 are \(\pm 1, \pm 5, \pm 7, \pm 35\).

     - For \(3n - 13 = 1\):
       \[ 3n = 14 \implies n = \frac{14}{3} \]
       This is not an integer, so it is not a valid solution.

     - For \(3n - 13 = -1\):
       \[ 3n = 12 \implies n = 4 \]
       This case has already been considered.

     - For \(3n - 13 = 5\):
       \[ 3n = 18 \implies n = 6 \]
       Substituting \(n = 6\) into \(|6n^2 - 17n - 39|\):
       \[ |6(6)^2 - 17(6) - 39| = |216 - 102 - 39| = |75| = 75 \]
       Since 75 is not a power of a prime, this is not a valid solution.

     - For \(3n - 13 = -5\):
       \[ 3n = 8 \implies n = \frac{8}{3} \]
       This is not an integer, so it is not a valid solution.

     - For \(3n - 13 = 7\):
       \[ 3n = 20 \implies n = \frac{20}{3} \]
       This is not an integer, so it is not a valid solution.

     - For \(3n - 13 = -7\):
       \[ 3n = 6 \implies n = 2 \]
       Substituting \(n = 2\) into \(|6n^2 - 17n - 39|\):
       \[ |6(2)^2 - 17(2) - 39| = |24 - 34 - 39| = |-49| = 49 \]
       Since \(49 = 7^2\), we have \(p = 7\) and \(k = 2\).

4. **Case 4: \(\beta > \alpha\)**
   - If \(\beta > \alpha\), then \(|2n + 3|\) divides \(|3n - 13|\):
     \[ 2n + 3 \mid 3n - 13 \]
     \[ 2n + 3 \mid 3(2n + 3) - 2(3n - 13) \]
     \[ 2n + 3 \mid 6n + 9 - 6n + 26 \]
     \[ 2n + 3 \mid 35 \]
     The divisors of 35 are \(\pm 1, \pm 5, \pm 7, \pm 35\).

     - For \(2n + 3 = 1\):
       \[ 2n = -2 \implies n = -1 \]
       This case has already been considered.

     - For \(2n + 3 = -1\):
       \[ 2n = -4 \implies n = -2 \]
       This case has already been considered.

     - For \(2n + 3 = 5\):
       \[ 2n = 2 \implies n = 1 \]
       Substituting \(n = 1\) into \(|6n^2 - 17n - 39|\):
       \[ |6(1)^2 - 17(1) - 39| = |6 - 17 - 39| = |-50| = 50 \]
       Since 50 is not a power of a prime, this is not a valid solution.

     - For \(2n + 3 = -5\):
       \[ 2n = -8 \implies n = -4 \]
       Substituting \(n = -4\) into \(|6n^2 - 17n - 39|\):
       \[ |6(-4)^2 - 17(-4) - 39| = |96 + 68 - 39| = |125| = 125 \]
       Since \(125 = 5^3\), we have \(p = 5\) and \(k = 3\).

     - For \(2n + 3 = 7\):
       \[ 2n = 4 \implies n = 2 \]
       This case has already been considered.

     - For \(2n + 3 = -7\):
       \[ 2n = -10 \implies n = -5 \]
       Substituting \(n = -5\) into \(|6n^2 - 17n - 39|\):
       \[ |6(-5)^2 - 17(-5) - 39| = |150 + 85 - 39| = |196| = 196 \]
       Since \(196 = 14^2\), this is not a valid solution.

     - For \(2n + 3 = 35\):
       \[ 2n = 32 \implies n = 16 \]
       Substituting \(n = 16\) into \(|6n^2 - 17n - 39|\):
       \[ |6(16)^2 - 17(16) - 39| = |1536 - 272 - 39| = |1225| = 1225 \]
       Since \(1225 = 35^2\), this is not a valid solution.

     - For \(2n + 3 = -35\):
       \[ 2n = -38 \implies n = -19 \]
       Substituting \(n = -19\) into \(|6n^2 - 17n - 39|\):
       \[ |6(-19)^2 - 17(-19) - 39| = |2166 + 323 - 39| = |2450| = 2450 \]
       Since 2450 is not a power of a prime, this is not a valid solution.

In conclusion, the solution set is:
\[
\boxed{\{(n, p, k) : (-1, 2, 4), (-2, 19, 1), (4, 11, 1), (2, 7, 2), (-4, 5, 3)\}}
\]