when is prime and is a Bell number.
Touchard's Congruence
See also
Bell NumberExplore with Wolfram|Alpha
Cite this as:
Weisstein, Eric W. "Touchard's Congruence." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/TouchardsCongruence.html