Artin’s conjecture and the ternary Goldbach problem