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.

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.

A112046 a(n) = the least k >= 1 for which the Jacobi symbol J(k,2n+1) is not +1 (thus is either 0 or -1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

If we instead list the least k >= 1, for which Jacobi symbol J(k,2n+1) is 0, we get A090368.
It is easy to see that every term is prime. Because the Jacobi symbol is multiplicative as J(ab,m) = J(a,m)*J(b,m) and if for every index i>=1 and < x, J(i,m)=1, then if J(x,m) is 0 or -1, x cannot be composite (say y*z, with both y and z less than x), as then either J(y,m) or J(z,m) would be non-one, which contradicts our assumption that x is the first index where non-one value appears. Thus x must be prime.

Crossrefs

One more than A112050.
Bisections: A112047, A112048, and their difference: A112053.

Programs

  • PARI
    A112046(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(i))); \\ Antti Karttunen, May 26 2017
    
  • Python
    from sympy import jacobi_symbol as J
    def a(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    print([a(n) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017

Formula

a(n) = A112050(n) + 1 = A000040(A112049(n)).
Showing 1-2 of 2 results.