cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A232195 Product of distinct squares in Z_n (mod n), without the factor 0.

Original entry on oeis.org

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

Views

Author

Martin Schellenberg, Nov 20 2013

Keywords

Comments

Up to n = 10000 a(n) is divisible by 4 except for the values 1 and 9 (a(27)).

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).

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)
Showing 1-1 of 1 results.