%I #35 Oct 27 2023 21:54:15
%S 1,1,3,1,10,8,13,18,22,17,30,6,9,42,1,30,1,50,66,70,27,1,1,34,22,10,1,
%T 1,76,15,1,130,37,1,105,150,28,162,166,93,178,19,1,81,14,1,1,222,226,
%U 107,144,238,64,1,16,1,82,270,60,53,1,155,1,310,288,203,1
%N a(n) = hyperfactorial(prime(n)-1) mod prime(n).
%H Alois P. Heinz, <a href="/A260178/b260178.txt">Table of n, a(n) for n = 1..10000</a> (first 687 terms from Matthew Campbell)
%F a(n) = A002109(A000040(n)-1) mod A000040(n).
%e a(2) = hyperfactorial(2) mod 3 = (2^2*1^1) mod 3 = 4 mod 3 = 1.
%p a:= proc(n) option remember; local i, p, r, v;
%p p, r, v:= ithprime(n), 1$2;
%p for i from p-1 to 1 by -1 do
%p v:= v*i mod p; r:= r*v mod p
%p od; r
%p end:
%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 21 2015
%t Table[Mod[Hyperfactorial[Prime[n] - 1], Prime[n]], {n, 1, 200}]
%o (PARI) a(n,p=prime(n))=lift(prod(k=2,p-1,Mod(k,p)^k)) \\ _Charles R Greathouse IV_, Jul 23 2015
%Y Cf. A000040, A002109, A260611.
%K nonn,easy
%O 1,3
%A _Matthew Campbell_, Jul 17 2015