A265694 a(n) = n!! mod n^2 where n!! is a double factorial number (A006882).
0, 2, 3, 8, 15, 12, 7, 0, 54, 40, 110, 0, 104, 84, 0, 0, 221, 0, 342, 0, 0, 220, 506, 0, 0, 312, 0, 0, 493, 0, 930, 0, 0, 544, 0, 0, 222, 684, 0, 0, 369, 0, 1806, 0, 0, 1012, 47, 0, 0, 0, 0, 0, 1590, 0, 0, 0, 0, 1624, 59, 0, 3050, 1860, 0, 0, 0, 0, 4422, 0, 0, 0
Offset: 1
Examples
For n = 1, a(1) = 1!! mod 1^2 = 1 mod 1 = 0. For n = 2, a(2) = 2!! mod 2^2 = 2 mod 4 = 2. For n = 8, a(8) = 8!! mod 8^2 = 384 mod 64 = 0.
Crossrefs
Cf. A006882.
Programs
-
Magma
DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n) mod n^2: n in [1..70] ]; // Vincenzo Librandi, Dec 14 2015
-
Mathematica
Table[Mod[n!!, n^2], {n, 70}] (* Michael De Vlieger, Dec 14 2015 *)
-
PARI
df(n) = if( n<0, 0, my(E); E = exp(x^2 / 2 + x * O(x^n)); n! * polcoeff( 1 + E * x * (1 + intformal(1 / E)), n)); vector(70, n, df(n) % n^2)
Formula
a(A009188(n+1)) = 0 for n > 0.
Comments