OFFSET
1,4
COMMENTS
!n is a subfactorial number (A000166).
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7)=6 because !(7-1) = 265, and 265 == 6 mod 7.
MAPLE
with(numtheory): f:=n->sum(n!*(((-1)^k)*1/k!), k=0..n):for n from 1 to 150 do: x:=irem(f(n-1), n): printf(`%d, `, x):od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 05 2012
STATUS
approved