1. He claims he can't be executed on Friday, because it wouldn't be a surprise.
2. He then argues similarly that he can't be executed any other day.
3. He concludes therefore that he can't be executed.
But if "I won't be executed at all" was a possibility, then he could never even rule out Friday: on Friday, he'll either get executed, or not at all. Both are possible, so he can't claim an execution on Friday would be predictable beforehand.
#1 If it stays true from the beginning, the first step of the prisoner's logical induction is invalid and the prisoner accepts he will be surprised.
#2 If it stays false from the beginning, the prisoner can make the logical induction, coming to a conclusion that is invalid (contrary to an assumption) so he accepts that he will be surprised.
If it can change at any point, see #1.
>The next week, the executioner knocks on the prisoner's door at noon on Wednesday — which, despite all the above, was an utter surprise to him. Everything the judge said came true.
In this case, it's "You will die on a day not deducible from this statement", but the self-reference is concealed by asserting it will be a "surprise".