Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 May 31 2024 22:07:22
%S 1,1,1,1,16,48,64,16,784,233280,291600,20736,167961600,281014272,
%T 74649600,1679616,3229640294400,2472693350400,511642685030400,
%U 2751882854400,4854321355161600,2085841207296000000,216982220508758016,15850845241344,25975097361564696576
%N a(n) = Product_{k=1..n} (k^2 mod n if k^2 mod n > 0).
%C a(n) mod A372651(n) = 0.
%t a[n_]:=Product[Max[Mod[k^2,n],1],{k,n}]; Array[a,25] (* _Stefano Spezia_, May 30 2024 *)
%o (Python)
%o def a(n):
%o tmp = 1
%o for i in range(1, n+1):
%o if (k := pow(i,2,n)): tmp *= k
%o return tmp
%o print([a(n) for n in range(1, 26)])
%o (PARI) a(n) = my(x); prod(k=1, n, if ((x=lift(Mod(k,n)^2))>0, x, 1)); \\ _Michel Marcus_, May 30 2024
%Y Cf. A165909, A230366, A372651.
%K nonn
%O 1,5
%A _DarĂo Clavijo_, May 30 2024