My favorite book which influenced mathematics the most is Arithmetics by Diophantos of Alexandria Volume VI and Arithmetic Arrangements Part I. The book itself ranks probably very low on a list of prominent books, if there wasn’t its most prominent reader Pierre de Fermat (1607-1665) who commented one equation.
“On the contrary, it is impossible to divide either a cube into two cubes, or a double square, or in general any power greater than the square into two powers of the same degree: I have discovered a truly wonderful demonstration that this margin is too narrow to hold.”
This remark basically established entire branches of mathematics, number theory being just one of them. It lasted 3½ centuries until Andrew Wiles really could provide a wonderful demonstration in 1994. Learning to read his proof alone, would equal a study of mathematics.