Checks whether a number satisfies the Armstrong condition.