On the irrationality of Cantor and Ahmes series