OFFSET
1,1
COMMENTS
Igor Shparlinski proved in 1991 that k < (1/2)*binomial(2*p,p) (see A290059).
LINKS
I. E. Shparlinskiy, On the Distribution of Values of Recurring Sequences and the Bell Numbers in Finite Fields, European Journal of Combinatorics, Vol. 12, No. 1 (1991), pp. 81-87.
EXAMPLE
a(1)=5 since modulo 5 we have B(0)=1, B(1)=1, B(2)=2, and B(3)=0.
MATHEMATICA
q[p_] := Module[{k = 1}, While[k < p && ! Divisible[BellB[k], p], k++]; k < p]; Select[Range[500], PrimeQ[#] && q[#] &] (* Amiram Eldar, Dec 30 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Luis H. Gallardo, Dec 30 2021
STATUS
approved