OFFSET
1,5
FORMULA
PROG
(Python)
from sympy import prod
def a(n):
k, QS = 0, []
for i in range((n >> 1) + 1):
if k > 0: QS.append(k)
k += (i << 1) + 1
k %= n
return prod(set(QS))
print([a(n) for n in range(1, 34)])
(PARI) a(n) = my(list=List()); for (i=1, n-1, if (issquare(Mod(i, n)), listput(list, i))); vecprod(Vec(list)); \\ Michel Marcus, May 28 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
DarĂo Clavijo, May 27 2024
STATUS
proposed