OFFSET
1,2
COMMENTS
a(n) > 0, as n!! cannot be divisible by prime(n): n < prime(n) for all n, so the prime factorization of n!! never includes prime(n).
a(n) = 1 for n = 1, 4, 37, 2721, ... .
a(n) = n for n = 1, 2, 3, 86, 122, ... .
LINKS
Andrew Nelson, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = n!! mod prime(n), where n!! denotes the double factorial of n.
EXAMPLE
For n = 4, a(4) = 4!! mod prime(4) = 8 mod 7 = 1.
MATHEMATICA
Table[Mod[n!!, Prime[n]], {n, 100}]
PROG
(PARI) a(n) = my(p=prime(n)); lift(prod(i=0, (n-1)\2, Mod(n-2*i, p))); \\ Michel Marcus, Feb 25 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Nelson, Feb 17 2020
STATUS
approved