OFFSET
1,2
COMMENTS
Inspired by geometric meaning of distribution of 0's in this sequence.
Position of 0's in this sequence is directly related with sequence which gives the short leg of more than one Pythagorean triangle (A009188). See comment sections in A009188 and A264828 which are the related sequences for further information.
More precisely, a(A009188(n+1)) = 0 for n > 0.
FORMULA
a(A009188(n+1)) = 0 for n > 0.
EXAMPLE
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.
MATHEMATICA
Table[Mod[n!!, n^2], {n, 70}] (* Michael De Vlieger, Dec 14 2015 *)
PROG
(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)
(Magma) DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n) mod n^2: n in [1..70] ]; // Vincenzo Librandi, Dec 14 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Dec 13 2015
STATUS
approved