login
A216445
a(n) = !n mod n!!.
1
0, 0, 1, 2, 1, 14, 25, 69, 241, 251, 2481, 6830, 4921, 119547, 250489, 780584, 8507745, 5562314, 2246113, 592853256, 853522921, 1510777190, 67329163881, 131984971712, 1849868497489, 132447220974, 29144172315025, 92977949123774, 608057424846873, 1214694444952016
OFFSET
0,4
COMMENTS
!n is a subfactorial number (A000166).
n!! is a double factorial number (A006882).
EXAMPLE
a(6) = !6 mod 6!! = 265 mod 48 = 25. - Indranil Ghosh, Feb 15 2017
MAPLE
sf:= proc(n) option remember; n*procname(n-1)+(-1)^n end proc:
sf(0):= 1:
df:= proc(n) option remember; n*procname(n-2) end proc:
df(0):= 1: df(1):= 1:
map(t -> sf(t) mod df(t), [$0..50]); # Robert Israel, Nov 16 2017
MATHEMATICA
Table[Mod[Subfactorial[n], n!!], {n, 0, 30} ]
CROSSREFS
Sequence in context: A245733 A276851 A080346 * A124026 A106204 A290603
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 07 2012
STATUS
approved