Let be the event that the block beginning at position , , is a spalindrome. Each has probability . If two starting positions differ by , the first half of the later block contains the middle digit of the earlier palindrome twice, contradicting distinctness. Thus the only possible overlap is .
That intersection consists of words , where has distinct digits, and hence has probability . This overlap structure of digit spalindromes makes inclusion--exclusion give
Solved by gpt-5.6-sol high.
Codex Wiki