For every positive integer $n{}$, consider the numbers $a_1=n^2-10n+23, a_2=n^2-9n+31, a_3=n^2-12n+46.$
a) Prove that $a_1+a_2+a_3$ is even.
b) Find all positive integers $n$ for which $a_1, a_2$ and $a_3$ are primes.
### Part (a)
1. We are given the expressions for \(a_1\), \(a_2\), and \(a_3\):
   \[
   a_1 = n^2 - 10n + 23, \quad a_2 = n^2 - 9n + 31, \quad a_3 = n^2 - 12n + 46
   \]
2. We need to prove that \(a_1 + a_2 + a_3\) is even. First, we sum the expressions:
   \[
   a_1 + a_2 + a_3 = (n^2 - 10n + 23) + (n^2 - 9n + 31) + (n^2 - 12n + 46)
   \]
3. Combine like terms:
   \[
   a_1 + a_2 + a_3 = 3n^2 - 31n + 100
   \]
4. To determine if this sum is even, we consider the expression modulo 2:
   \[
   3n^2 - 31n + 100 \equiv n^2 - n \pmod{2}
   \]
5. Notice that \(n(n-1)\) is always even because it is the product of two consecutive integers, one of which is always even:
   \[
   n(n-1) \equiv 0 \pmod{2}
   \]
6. Therefore:
   \[
   3n^2 - 31n + 100 \equiv 0 \pmod{2}
   \]
   This proves that \(a_1 + a_2 + a_3\) is even.

### Part (b)
1. We need to find all positive integers \(n\) for which \(a_1\), \(a_2\), and \(a_3\) are primes.
2. First, consider the parity of \(a_1\) and \(a_3\):
   - \(a_1 = n^2 - 10n + 23\)
   - \(a_3 = n^2 - 12n + 46\)
3. Since \(a_1\) and \(a_3\) must be primes, and primes greater than 2 are odd, we consider the cases where one of them is 2.
4. **Case 1**: \(a_1 = 2\)
   \[
   n^2 - 10n + 23 = 2 \implies n^2 - 10n + 21 = 0
   \]
   Solve the quadratic equation:
   \[
   n^2 - 10n + 21 = 0 \implies (n-3)(n-7) = 0
   \]
   Thus, \(n = 3\) or \(n = 7\).
5. Check if \(a_2\) and \(a_3\) are primes for \(n = 3\) and \(n = 7\):
   - For \(n = 3\):
     \[
     a_1 = 2, \quad a_2 = 3^2 - 9 \cdot 3 + 31 = 1, \quad a_3 = 3^2 - 12 \cdot 3 + 46 = 1
     \]
     Since 1 is not a prime, \(n = 3\) is not a solution.
   - For \(n = 7\):
     \[
     a_1 = 2, \quad a_2 = 7^2 - 9 \cdot 7 + 31 = 3, \quad a_3 = 7^2 - 12 \cdot 7 + 46 = 5
     \]
     Since 2, 3, and 5 are all primes, \(n = 7\) is a solution.
6. **Case 2**: \(a_3 = 2\)
   \[
   n^2 - 12n + 46 = 2 \implies n^2 - 12n + 44 = 0
   \]
   Solve the quadratic equation:
   \[
   n^2 - 12n + 44 = 0 \implies (n-6)^2 = -8
   \]
   This has no real solutions.

Conclusion:
The only positive integer \(n\) for which \(a_1\), \(a_2\), and \(a_3\) are all primes is \(n = 7\).

The final answer is \( \boxed{ n = 7 } \)