login
A232195
Product of distinct squares in Z_n (mod n), without the factor 0.
2
0, 1, 1, 1, 4, 0, 1, 4, 1, 0, 1, 0, 12, 0, 0, 4, 16, 0, 1, 0, 0, 0, 1, 0, 24, 0, 9, 0, 28, 0, 1, 0, 0, 0, 0, 0, 36, 0, 0, 0, 40, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 52, 0, 0, 0, 0, 0, 1, 0, 60, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 72, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0
OFFSET
1,5
COMMENTS
Up to n = 10000 a(n) is divisible by 4 except for the values 1 and 9 (a(27)).
LINKS
FORMULA
From Robert Israel, Apr 01 2021: (Start)
a(n) = 0 if n is in A024619, or if n = p^d with p > 3 prime and d >= 3, or if n = 2^d with d >= 5, or if n = 3^d with d >= 4.
a(p) = a(p^2) = 1 if p is in A002145.
a(p) = p-1 and a(p^2) = p^2-1 if p is in A002144.
(End)
MAPLE
A232195:= proc (n) options operator, arrow; modp(convert(`minus`({seq(modp(k^2, n), k = 1 .. n-1)}, {0}), `*`), n) end proc; seq(A232195(i), i = 1 .. 30);
PROG
(PARI) a(n) = if (n==1, 0, lift(vecprod(Set(select(x->(issquare(x) && (x!=0)), vector(n-1, k, Mod(k, n))))))); \\ Michel Marcus, Apr 01 2021
CROSSREFS
A071782 describes the sum of distinct squares in Z_n (mod n).
A000224 describes the number of distinct squares in Z_n (mod n).
Sequence in context: A178104 A172545 A124321 * A309333 A298924 A217476
KEYWORD
nonn
AUTHOR
Martin Schellenberg, Nov 20 2013
STATUS
approved