%I #30 Oct 25 2023 12:16:24
%S 1,2,6,10,5,13,18,1,12,1,31,9,42,46,23,1,11,66,1,27,78,1,34,22,91,102,
%T 1,33,15,126,130,37,1,44,1,129,162,1,80,178,162,190,81,183,198,1,1,
%U 226,122,144,1,64,1,16,262,187,1,217,53,1,138,1,1,288,114,1,189
%N ((p-1)/2)! mod p for odd primes p.
%C Values 1 correspond to primes listed in A058302. - _Max Alekseyev_, Oct 24 2023
%H Charles R Greathouse IV, <a href="/A004055/b004055.txt">Table of n, a(n) for n = 1..9999</a> [b-file corrected by _N. J. A. Sloane_, Oct 04 2010]
%p a:= n-> (p-> ((p-1)/2)! mod p)(ithprime(n+1)):
%p seq(a(n), n=1..73); # _Alois P. Heinz_, Oct 25 2023
%o (PARI) lista(n)=forprime(p=3, n, print1(((p-1)/2)! % p, ", ")); \\ _Michel Marcus_, May 24 2013
%o (PARI) a(n,p=prime(n+1))=lift(prod(k=2,p\2,k,Mod(1,p))) \\ _Charles R Greathouse IV_, May 01 2016
%o (Magma) [Factorial((p-1) div 2) mod p: p in PrimesInInterval(3,350)]; // _Vincenzo Librandi_, May 01 2016
%Y Cf. A058302, A065091.
%K nonn
%O 1,2
%A _Jeffrey Shallit_