Beatty sequences and the arithmetical hierarchy