%I #16 Sep 01 2018 03:30:24
%S 2,5,2,2,2,20663,2,229,2,2,2,11,2,5,2,2,2,23,2,3,2,2,2,101,2,3,2,2,2
%N a(n) is the smallest prime p such that p^2 divides Bell(p+n) - Bell(n+1) - Bell(n).
%C Jacques Touchard proved in 1933 that for the Bell numbers (A000110), Bell(p+k) == Bell(k+1) + Bell(k) (mod p) for all primes p and k >= 0.
%C a(29) > 242000 and a(89) > 90000, if they exist. The terms from a(30) to a(89) are 2, 163, 2, 2, 2, 7, 2, 19, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 7, 2, 2, 2, 359, 2, 3, 2, 2, 2, 7, 2, 43, 2, 2, 2, 3, 2, 5, 2, 2, 2, 5, 2, 547, 2, 2, 2, 3, 2, 7, 2, 2, 2, 59, 2, 5, 2, 2, 2. - _Giovanni Resta_, Aug 26 2018
%C a(29) > 10^7. - _Hiroaki Yamanouchi_, Sep 01 2018
%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 The smallest prime p such that Bell(p+1) == Bell(2)+Bell(1)(mod p^2) is 5, since Bell(6) - Bell(2) - Bell(1) = 203 - 2 - 1 = 200 = 5^2 * 8, thus a(1) = 5.
%t a = {}; n = 0; While[n < 101, p = 2; While[!Divisible[BellB[p + n] - BellB[n] - BellB[n + 1], p^2], p = NextPrime@p]; a = AppendTo[a, p]; n++]; a
%Y Cf. A000110, A283300, A286663.
%K nonn,more
%O 0,1
%A _Amiram Eldar_, May 12 2017