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.

Previous Showing 21-23 of 23 results.

A177864 a(n) is the smallest nontrivial quadratic residue modulo prime(n), for n >= 3.

Original entry on oeis.org

4, 2, 3, 3, 2, 4, 2, 4, 2, 3, 2, 4, 2, 4, 3, 3, 4, 2, 2, 2, 3, 2, 2, 4, 2, 3, 3, 2, 2, 3, 2, 4, 4, 2, 3, 4, 2, 4, 3, 3, 2, 2, 4, 2, 4, 2, 3, 3, 2, 2, 2, 3, 2, 2, 4, 2, 3, 2, 4, 4, 4, 2, 2, 4, 4, 2, 3, 3, 2, 2, 2, 3, 4, 2, 4, 3, 2, 2, 3, 3, 2, 2, 2, 3, 2, 2, 4, 2, 3, 2, 2, 3, 4, 2, 4, 2, 4, 3
Offset: 3

Views

Author

Jonathan Sondow, May 16 2010

Keywords

Comments

There is no quadratic residue > 1 modulo the first or 2nd prime, so the sequence begins with a(3).

Examples

			The quadratic residues modulo prime(3) = 5 are 1 and 4, so a(3) = 4.
		

Crossrefs

Cf. A063987 (triangle in which the n-th row gives the quadratic residues modulo prime(n)), A053760 (smallest positive quadratic nonresidue modulo prime(n)).

Programs

  • Mathematica
    Flatten[Table[ Extract[Flatten[ Position[Table[JacobiSymbol[i, Prime[n]], {i, 1, Prime[n] - 1}], 1]], {2}], {n, 3, 100}]]
  • PARI
    a(n,p=prime(n))=[2,0,0,0,4,0,2,0,0,0,3,0,3,0,0,0,2,0,4,0,0,0,2][p%24] \\ Charles R Greathouse IV, Jun 14 2022

Formula

a(n) = 2 or 3 or 4 according as prime(n) == 1,7,9,15,17,23 or 11,13 or 3,5,19,21 (mod 24), respectively, for n > 2, by the quadratic reciprocity law and its supplements.

A225225 Second smallest prime quadratic non-residue modulo the n-th prime.

Original entry on oeis.org

3, 3, 3, 5, 7, 5, 5, 3, 7, 3, 11, 5, 7, 3, 11, 3, 11, 7, 3, 11, 7, 7, 5, 7, 7, 3, 5, 5, 11, 5, 5, 17, 5, 3, 3, 7, 5, 3, 13, 3, 7, 7, 11, 11, 3, 11, 3, 5, 5, 7, 5, 13, 11, 11, 5, 7, 3, 13, 5, 11, 3, 3, 3, 17, 7, 3, 3, 11, 5, 7, 5, 13, 5, 5, 3, 11, 3, 5, 13, 11, 11, 13, 13, 7, 17, 5, 13, 11, 3, 5, 5, 17, 5, 7, 3, 17, 3, 7, 3, 11
Offset: 1

Views

Author

Jonathan Sondow, May 02 2013

Keywords

Comments

See comments, references and links in A053760 = Smallest positive quadratic nonresidue modulo the n-th prime.

Examples

			The positive quadratic non-residues modulo prime(5) = 11 are 2, 6, 7, 8, 10, 11, ... and the second smallest prime among them is 7, so a(5) = 7.
		

Crossrefs

Cf. A053760.

Programs

  • Mathematica
    Table[p = Prime[n]; Part[ Select[ Range[p+1], JacobiSymbol[#, p] != 1 &], 2], {n, 1, 100}]

A249271 Decimal expansion of the mean value over all positive integers of a function giving the least quadratic nonresidue modulo a given odd integer (this function is precisely defined in A053761).

Original entry on oeis.org

3, 1, 4, 7, 7, 5, 5, 1, 4, 8, 5, 0, 2, 4, 0, 0, 3, 1, 2, 5, 1, 6, 6, 7, 4, 9, 5, 5, 8, 7, 9, 7, 6, 9, 2, 0, 9, 2, 7, 2, 9, 3, 7, 7, 4, 8, 7, 9, 3, 3, 9, 8, 8, 6, 4, 0, 5, 9, 6, 4, 7, 0, 2, 0, 6, 6, 4, 7, 8, 1, 1, 8, 0, 0, 9, 1, 6, 7, 2, 4, 6, 7, 7, 9, 9, 7, 9, 4, 5, 2, 0, 9, 4, 8, 8, 2, 8, 7, 9, 7, 8, 6, 9, 1
Offset: 1

Views

Author

Jean-François Alcover, Oct 24 2014

Keywords

Examples

			3.147755148502400312516674955879769209272937748793398864...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge Univ. Press, 2003, Meissel-Mertens constants: Quadratic residues, pp. 96—98.

Crossrefs

Programs

  • Mathematica
    digits = 104; Clear[s]; s[m_] := s[m] = 1 + Sum[(Prime[j] + 1)*2^(-j + 1)* Product[1 - 1/Prime[i], {i, 1, j - 1}] // N[#, digits + 100]&, {j, 2, m}] ; s[10]; s[m = 20]; While[RealDigits[s[m]] != RealDigits[s[m/2]], Print[m]; m = 2*m]; RealDigits[s[m], 10, digits] // First
  • PARI
    do(lim)=my(p=2,pr=1.,s=1); forprime(q=3,lim, pr*=(1-1/p)/2; s+=(q+1)*pr; p=q); s \\ Charles R Greathouse IV, Dec 20 2017

Formula

1 + sum_{j=2..m} (p_j + 1)*2^(-j+1)*prod_{i=1..j-1} (1 - 1/p_i), where p_j is the j-th prime number.
Previous Showing 21-23 of 23 results.