OFFSET
1,3
COMMENTS
Gertsch Hamadene proved that !p == Bell(p-1) - 1 (mod p) for primes p.
LINKS
Daniel Barsky and Bénali Benzaghou, Nombres de Bell et somme de factorielles, Journal de théorie des nombres de Bordeaux, Vol. 16, No. 1 (2004), pp. 1-17.
Anne Gertsch Hamadene, Congruences pour quelques suites classiques de nombres, sommes de factorielles et calcul ombral, Doctoral dissertation, Université de Neuchâtel, 1999.
EXAMPLE
The 3rd prime is 5, so a(3) = (!5 - Bell(5-1) + 1)/5 = (34 - 15 + 1)/5 = 4.
MATHEMATICA
quot[p_] := (Sum[k!, {k, 0, p - 1}] - BellB[p - 1] + 1)/p; Table[quot[Prime[i]], {i, 1, 13}]
PROG
(PARI) a(n) = my(p=prime(n)); (a003422(p) - a000110(p-1) + 1)/p \\ Felix Fröhlich, Aug 04 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Aug 04 2019
STATUS
approved