login
A373286
a(n) = Product_{k=1..n} (k^2 mod n if k^2 mod n > 0).
0
1, 1, 1, 1, 16, 48, 64, 16, 784, 233280, 291600, 20736, 167961600, 281014272, 74649600, 1679616, 3229640294400, 2472693350400, 511642685030400, 2751882854400, 4854321355161600, 2085841207296000000, 216982220508758016, 15850845241344, 25975097361564696576
OFFSET
1,5
COMMENTS
a(n) mod A372651(n) = 0.
MATHEMATICA
a[n_]:=Product[Max[Mod[k^2, n], 1], {k, n}]; Array[a, 25] (* Stefano Spezia, May 30 2024 *)
PROG
(Python)
def a(n):
tmp = 1
for i in range(1, n+1):
if (k := pow(i, 2, n)): tmp *= k
return tmp
print([a(n) for n in range(1, 26)])
(PARI) a(n) = my(x); prod(k=1, n, if ((x=lift(Mod(k, n)^2))>0, x, 1)); \\ Michel Marcus, May 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
DarĂ­o Clavijo, May 30 2024
STATUS
approved