Gamow-teller strength functions with the Lanczos algorithm