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-2 of 2 results.

A163366 a(n) = (-1)^floor((prime(n)+2)/2) mod prime(n).

Original entry on oeis.org

1, 1, 4, 1, 1, 12, 16, 1, 1, 28, 1, 36, 40, 1, 1, 52, 1, 60, 1, 1, 72, 1, 1, 88, 96, 100, 1, 1, 108, 112, 1, 1, 136, 1, 148, 1, 156, 1, 1, 172, 1, 180, 1, 192, 196, 1, 1, 1, 1, 228, 232, 1, 240, 1, 256, 1, 268, 1, 276, 280, 1, 292, 1, 1, 312, 316, 1, 336, 1, 348, 352, 1, 1, 372, 1
Offset: 1

Views

Author

Peter Luschny, Jul 25 2009

Keywords

Comments

Remove the '1's from the sequence to get A152680.
Product modulo p of the quadratic residues of p, where p = prime(n). [Jonathan Sondow, May 14 2010]

Examples

			a(4) = 1 because the quadratic residues of prime(4) = 7 are 1, 2, and 4, and 1*2*4 = 8 == 1 (mod 7). - _Jonathan Sondow_, May 14 2010
		

References

  • Carl-Erik Froeberg, On sums and products of quadratic residues, BIT, Nord. Tidskr. Inf.-behandl. 11 (1971) 389-398. [Jonathan Sondow, May 14 2010]

Crossrefs

Programs

  • Maple
    seq((-1)^iquo(ithprime(i)+2,2) mod ithprime(i),i=1..113);
  • Mathematica
    Table[Mod[ Apply[Times, Flatten[Position[ Table[JacobiSymbol[i, Prime[n]], {i, 1, Prime[n] - 1}], 1]]], Prime[n]], {n, 1, 80}] (* Jonathan Sondow, May 14 2010 *)

Formula

a(n)*A177863(n) == -1 (mod prime(n)), by Wilson's theorem. - Jonathan Sondow, May 14 2010
a(n) = A177860(n) modulo prime(n). - Jonathan Sondow, May 14 2010

A177861 Product of the quadratic nonresidues of prime(n).

Original entry on oeis.org

1, 2, 6, 90, 6720, 36960, 11642400, 283046400, 2412984420000, 1140422816332800, 1226781977195174400, 1863152400854384640000, 5988092802221559085056000, 112886540292742916603904000, 158983195607776600998537600000000
Offset: 1

Views

Author

Jonathan Sondow, May 14 2010

Keywords

Comments

a(n) == (-1)^((p-1)/2) (mod p), if p = prime(n) is odd.

Examples

			The quadratic nonresidues of prime(4) = 7 are 3, 5, and 6, so a(4) = 3*5*6 = 90.
		

References

  • Carl-Erik Froeberg, On sums and products of quadratic residues, BIT, Nord. Tidskr. Inf.-behandl. 11 (1971) 389-398.

Crossrefs

A125615 Sum of the quadratic nonresidues of prime(n), A177860 Product of the quadratic residues of prime(n), A177863 Product of the quadratic nonresidues of prime(n) modulo prime(n).

Programs

  • Mathematica
    Table[ Apply[Times, Flatten[Position[ Table[JacobiSymbol[i, Prime[n]], {i, 1, Prime[n] - 1}], -1]]], {n, 1, 16}]

Formula

a(n) = (p-1)!/A177860(n), where p = prime(n).
Showing 1-2 of 2 results.