GENEVA — As Secretary of State John Kerry and foreign ministers from other world powers sought to work out an interim agreement to constrain Iran’s nuclear program, the Iranian government’s insistence on formal recognition of its “right” to enrich uranium emerged as a major obstacle, diplomats said Sunday. In long hours of closed-door discussions, Western and Iranian negotiators haggled over the language of a possible agreement. Toward the end of a marathon session, some diplomats believed that only a handful of words appeared to separate the two sides.