Fix a sequence $a_1,a_2,a_3\ldots$ of integers satisfying the following condition:for all prime numbers $p$ and all positive integers $k$,we have $a_{pk+1}=pa_k-3a_p+13$.Determine all possible values of $a_{2013}$.
1. **Understanding the given condition:**
   We are given a sequence \(a_1, a_2, a_3, \ldots\) of integers that satisfies the condition:
   \[
   a_{pk+1} = pa_k - 3a_p + 13
   \]
   for all prime numbers \(p\) and all positive integers \(k\).

2. **Finding \(a_1\):**
   Let's start by considering \(k = 1\) and \(p = 2\):
   \[
   a_{2 \cdot 1 + 1} = 2a_1 - 3a_2 + 13 \implies a_3 = 2a_1 - 3a_2 + 13
   \]
   Similarly, for \(p = 3\) and \(k = 1\):
   \[
   a_{3 \cdot 1 + 1} = 3a_1 - 3a_3 + 13 \implies a_4 = 3a_1 - 3a_3 + 13
   \]

3. **Finding a general form:**
   To find a general form, we need to explore more values. Let's consider \(p = 2\) and \(k = 2\):
   \[
   a_{2 \cdot 2 + 1} = 2a_2 - 3a_2 + 13 \implies a_5 = 2a_2 - 3a_2 + 13 = -a_2 + 13
   \]

4. **Exploring specific values:**
   Let's try to find a pattern by considering specific values of \(p\) and \(k\). For \(p = 3\) and \(k = 2\):
   \[
   a_{3 \cdot 2 + 1} = 3a_2 - 3a_3 + 13 \implies a_7 = 3a_2 - 3a_3 + 13
   \]

5. **Solving for \(a_{2013}\):**
   We need to find \(a_{2013}\). Notice that 2013 is not a prime number, but we can express it in terms of primes. Since 2013 = 3 \cdot 671 + 1, we can use the given condition:
   \[
   a_{2013} = a_{3 \cdot 671 + 1} = 3a_{671} - 3a_3 + 13
   \]
   To find \(a_{671}\), we need to express 671 in terms of primes. Since 671 = 11 \cdot 61, we can use the condition again:
   \[
   a_{671} = a_{11 \cdot 61 + 1} = 11a_{61} - 3a_{11} + 13
   \]
   Continuing this process, we need to find \(a_{61}\), \(a_{11}\), and so on. This recursive process suggests that the sequence might have a specific form.

6. **Assuming a linear form:**
   Suppose \(a_n = cn + d\) for some constants \(c\) and \(d\). Substituting this into the given condition:
   \[
   a_{pk+1} = c(pk+1) + d = cpk + c + d
   \]
   On the other hand:
   \[
   pa_k - 3a_p + 13 = p(ck + d) - 3(cp + d) + 13 = pck + pd - 3cp - 3d + 13
   \]
   Equating the two expressions:
   \[
   cpk + c + d = pck + pd - 3cp - 3d + 13
   \]
   Simplifying, we get:
   \[
   c + d = pd - 3cp - 3d + 13
   \]
   This implies:
   \[
   c + d = pd - 3cp - 3d + 13
   \]
   Solving for \(c\) and \(d\), we find that \(c = 0\) and \(d = 13\).

7. **Conclusion:**
   Therefore, the sequence \(a_n = 13\) satisfies the given condition for all \(n\). Hence, \(a_{2013} = 13\).

The final answer is \(\boxed{13}\)