The coefficient matrix has determinant det(A)=−(n−1)(n−2).
The system has a unique solution when det(A)=0, which requires n=1 and n=2.
For a fair die, n∈{1,2,3,4,5,6}, so the unique solution occurs for n∈{3,4,5,6}.
The probability is 64=32, giving k=4.
The sum of k and all possible values of n where unique solution exists is 4+(3+4+5+6)=22.