OFFSET
1,3
COMMENTS
For a(n) Modd prime(n) see a comment on A209389 stating the analog of Wilson's theorem for Modd prime(n). For Modd n, (not to be confused with mod n) see a comment on A203571. - Wolfdieter Lang, Mar 28 2012
a(n)^2 == A212159(n) (mod prime(n)), n >= 2. See also the W. HolsztyĆski link given there. - Wolfdieter Lang, May 07 2012
FORMULA
a(1) = 0!! := 1 and a(n) = Product_{k=0..(prime(n)-3)/2} (2*k+1), n >= 2.
a(n) = A006882(prime(n)-2). - Michel Marcus, Sep 12 2023
EXAMPLE
For n = 5, prime(5) = A000040(5) = 11, 9!!= 1*3*5*7*9 = A040976(5)!! = A006882(9) = A001147(5) = 945.
a(5)^2 = 893025 == +1 (mod 11). - Wolfdieter Lang, May 07 2012
MATHEMATICA
Table[(Prime[n] - 2)!!, {n, 1, 16}] (* Amiram Eldar, Sep 14 2023 *)
PROG
(PARI) a(n) = if (n==1, 1, prod(k=0, (prime(n)-3)/2, 2*k+1)); \\ Michel Marcus, Sep 12 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Feb 18 2012
STATUS
approved