Zeros of entire functions and a problem of Ramanujan