login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216445 a(n) = !n mod n!!. 1

%I #20 Nov 16 2017 00:53:51

%S 0,0,1,2,1,14,25,69,241,251,2481,6830,4921,119547,250489,780584,

%T 8507745,5562314,2246113,592853256,853522921,1510777190,67329163881,

%U 131984971712,1849868497489,132447220974,29144172315025,92977949123774,608057424846873,1214694444952016

%N a(n) = !n mod n!!.

%C !n is a subfactorial number (A000166).

%C n!! is a double factorial number (A006882).

%H Indranil Ghosh, <a href="/A216445/b216445.txt">Table of n, a(n) for n = 0..800</a>

%H Indranil Ghosh, <a href="/A216445/a216445_1.txt">Python Program to generate the b-file</a>

%e a(6) = !6 mod 6!! = 265 mod 48 = 25. - _Indranil Ghosh_, Feb 15 2017

%p sf:= proc(n) option remember; n*procname(n-1)+(-1)^n end proc:

%p sf(0):= 1:

%p df:= proc(n) option remember; n*procname(n-2) end proc:

%p df(0):= 1: df(1):= 1:

%p map(t -> sf(t) mod df(t), [$0..50]); # _Robert Israel_, Nov 16 2017

%t Table[Mod[Subfactorial[n],n!!],{n, 0,30} ]

%Y Cf. A006882, A000166.

%K nonn

%O 0,4

%A _Michel Lagneau_, Sep 07 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)