A232195 Product of distinct squares in Z_n (mod n), without the factor 0.
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
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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);
-
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
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)
Comments