Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Sep 09 2019 11:40:48
%S 2,5,11,109,509,4099,2951209
%N Primes p such that p^2 divides Bell(p) - 2.
%C A special case of Touchard's congruence is Bell(p) == 2 (mod p) for all primes p, where Bell(n) are the Bell numbers (A000110). These primes are for Touchard's congruence as Wieferich primes (A001220) are for Fermat's little theorem and Wilson primes (A007540) are for Wilson's theorem.
%D J. Touchard, "Propriétés arithmétiques de certains nombres récurrents", Ann. Soc. Sci. Bruxelles A 53 (1933), pp. 21-31.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TouchardsCongruence.html">Touchard's Congruence</a>
%e For n=3, a(3)=11, Bell(11)=678570, Bell(11) - 2 = 11^2 * 61688.
%t Select[Prime[Range[1000]], Divisible[BellB[#]-2, #^2] &]
%Y Cf. A000110 (Bell numbers).
%K nonn,hard,more,nice
%O 1,1
%A _Amiram Eldar_, Mar 04 2017
%E a(7) from _Hiroaki Yamanouchi_, Aug 30 2018