In an excellent and informative article, Professor Marty Lockshin of York University, a rabbi, examined the difficulty raised by Deuteronomy 13:2-4 and tells the solutions offered in a Midrash and by several medieval Jewish commentators. I will add another solution.
Deuteronomy states: “If there appears among you a prophet or a dream-diviner – and he gives you a sign or potent, and the sign or potent that he named to you comes true – saying, ‘Let us follow other gods – whom you have not known – and worship them,’ do not heed the words of the prophet or the dream-diviner.” The verse concludes by saying that God is testing you in regard to this matter. Since the term “a sign or potent” in the Pentateuch is used to indicate a miracle, the question arises “can a false prophet perform miracles?” Or, Does God give false prophets the ability to create a miracle, especially one that could mislead the people. Professor Lockshin tells us the solutions offered by various rabbis and scholars.
Briefly stated, Midrash Sifre Devarim 84:3 has the opinion of two rabbis. R. Yossi contends that the idolaters were given control over the sun, moon, stars, and constellations and can use their power to accomplish what they want. R. Akiva insisted that God would stop the sun and others from aiding the idolaters. He states that the solution to the problem – does a false prophet have the ability to create miracles – is, the false prophet was once a true prophet who had this divine power, but he turned and became a false prophet.
Rashbam (about 1080-about 1165) is similar to R. Yossi in the Midrash. He felt that, with the proper tools, all humans have the ability to foretell the future. They can do so by using sorcery or other magic. It works, but God prohibited the Israelites from using this natural phenomenon as well as the sun and other heavenly spheres in Deuteronomy 18:9-22, a section that also speaks about false prophets, as does Deuteronomy 13, described above.
Abraham ibn Ezra (1089-1167) offered three possible solutions: (1) The false prophet stole (plagiarized) the prophecy of a true prophet. (2) Ignoring how a false prophet can perform a miracle, the verse is telling us that we should never rely on miracles. People must rely on reason. This verse is a hypothetical, even if a man should be able to perform a miracle, you should not act based on this act. When he states that one should worship idols and proves it by a miracle, reject it because reason must trump miracles, and reason states that idol worship is absurd. (3) The solution preferred by ibn Ezra is that “a sign or potent” does not mean a supernatural miracle, it is some symbolical act performed by the false prophet, such as Isaiah walking naked and barefoot in Isaiah 20:3 was not a miracle, but a symbolic act to call the people’s attention to Isaiah’s message. The question “how can a false prophet perform a miracle? Disappears. The false prophet did not perform a miracle.
A similar response to the question is the view of Maimonides about prophecy, a view that Professor Lockshin does not discuss. In his Guide of the Perplexed 2:32-48, Maimonides explains that prophecy is not a miraculous experience and it is not a communication from God. Prophecy is a natural experience. Prophets are individuals with higher than average intelligence that makes it possible for them to understand events better than others. Understanding problems facing people that do not understand the difficulties, prophets explain them to the people. The prophets also have a far better imagination that the average person, which enhances their understandings and which makes it easy for prophets to communicate their understanding to others. A third requirement is that prophets be virtuous and principled so that they look to improve and benefits society. In 2:48, Maimonides states that when the Bible says that God is testing the people, it means that nature is testing them. If people heed false prophets, the natural result will be that they will be harmed. Maimonides says there that the Torah ascribes this natural event, of harm coming to the people, to God because God created the laws of nature.
In contrast, a false prophet is an intelligent person who is either not altogether smart, lacking in sufficient imagination, or not properly descent, who communicates his unreasonable views to the people. The Torah is saying, you must use your intelligence and evaluate what people say to you; do not be persuaded by any signs and wonders, any tricks of sophistry, oratory, convoluted arguments, demonstrations, or half-truths.
 The Torah.Com, A historical and Contextual Approach, August 2018, “Can a False Prophet Perform Miracles?”
 Professor Lockshin’s translation. The term “potent” can also be translated “wonder.”
 The term “sign and wonder” is also used to describe Moses’ activities in Deuteronomy 34:11, “the signs and wonders which the Lord sent him to do in the land of Egypt.”
 Both solutions are problematical. R. Yossi contends, as do many other rabbis, that the sun and others have super-human powers that can be used effectively – they are a kind of semi-god – but God stated the Israelites should not use them, but rely only on God. R. Akiva fails to explain why God would allow a man who became an idolater to retain the powers given to a true prophet.
 This explanation is an excellent example of ibn Ezra’s rational approach to the Bible, and it makes sense. Professor Lockshin sees ibn Ezra’s view as problematical because the biblical text states that whether to follow the false prophet or not is a test, “But if the false prophet simply performed a symbolic action, what is the test.” I understand ibn Ezra to say that a man tries to persuade people to act unreasonably and uses some symbols to prove the rationality of his view. The test is whether the people will see through the trick, use their minds, their ability to reason, and not abandon God for hand-made idols.