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