Safiyyah bint Abi Ubayd (may Allah have mercy on her) narrates that she heard Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) saying on the pulpit: "I heard the Messenger of Allah (peace and blessings be upon him) say: 'Whoever goes to a fortune-teller (one who claims knowledge of the unseen), his prayer will not be accepted for forty nights.'"
In our hearing it was with the words "from Abu Bakr, from Nafi', from his father", and I think this is an error; the correct is what has been written (above). And Allah knows best.
Al-Haytham (may Allah have mercy on him) also narrated it from Abbas al-Duri, from Ibrahim bin Hamzah bin Muhammad bin Hamzah bin Mu'ayqib bin al-Zubayr, from Abd al-Aziz al-Darawardi, from Abdullah bin Umar bin Nafi', from his father, from Safiyyah (may Allah have mercy on her), from Sayyiduna Umar (may Allah be pleased with him).
And with this same chain, Sayyiduna Ibn Umar (may Allah be pleased with them both) narrates from the Prophet (peace and blessings be upon him).