Sometime after this Khayyam left Esfahan and travelled to Merv (now Mary, Turkmenistan) which Sanjar had made the capital of the Seljuq empire. Sanjar created a great centre of Islamic learning in Merv where Khayyam wrote further works on mathematics.
Minsan matapos na ito Khayyam kaliwa Esfahan at manlalakbay sa Merv (ngayon Maria, Turkmenistan) na Sanjar had ginawa ang kapitolyo ng Seljuq imperyo. Sanjar nilikha ng isang magaling na sentro ng Islamic pag-aaral sa Merv kung saan Khayyam wrote karagdagang gumagana sa matematika.