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

A112054 Indices where A112053 is not zero.

Original entry on oeis.org

12, 18, 30, 42, 48, 72, 78, 90, 102, 108, 120, 132, 138, 162, 168, 180, 192, 198, 210, 222, 228, 240, 252, 258, 282, 288, 300, 312, 318, 330, 342, 348, 372, 378, 390, 402, 408, 420, 432, 438, 450, 462, 468, 492, 498, 510, 522, 528, 540, 552, 558, 582, 588
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

These are all divisible by 6, as J(2,m) = +1 if m = 1 or 7 mod 8 and -1 if m = 3 or 5 mod 8 and J(3,m) = +1 if m = 1 or 11 mod 12, -1 if m = 5 or 7 mod 12 and 0 if m = 3 or 9 mod 12 (where Jacobi symbol J(i,m) returns +1 if i is quadratic residue modulo odd number m), it follows that only when i=24*n it holds that J(2,i-1)=J(2,i+1)=J(3,i-1)=J(3,i+1)=+1 and thus only then the function A112046 (and A112053) depends on values of J(k>3,m).

Crossrefs

Cf. A112058(n) = 4*a(n). A112055(n) = a(n)/6.

Programs

  • Mathematica
    a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; Select[Range[1000], a112046[2#] - a112046[2# - 1] != 0 &] (* Indranil Ghosh, May 24 2017 *)
  • Python
    from sympy import jacobi_symbol as J
    def a112046(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    def a(n): return a112046(2*n) - a112046(2*n - 1)
    print([n for n in range(1, 1001) if a(n)!=0]) # Indranil Ghosh, May 24 2017

A112059 Nonzero terms of A112053 and A112080.

Original entry on oeis.org

2, -2, 4, 8, -2, 12, -6, 12, 2, -2, -6, 18, -6, 2, -6, -4, 2, -2, 18, 2, -2, 24, 6, -2, 6, -8, 4, 2, -2, -6, 32, -6, 2, -6, -10, 2, -2, 28, 2, -2, 4, 38, -2, 6, -6, 4, 2, -2, -4, 42, -6, 2, -8, -4, 2, -2, 2, -2, 6, 8, -2, 48, -6, 4, 2, -2, -10, 6, -12, 2, -6, -4, 2, -2, 2, -2, 52, 8
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Programs

  • Python
    from sympy import jacobi_symbol as J
    def a112046(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    def a(n): return a112046(2*n) - a112046(2*n - 1)
    print([a(n) for n in range(1, 201) if a(n)!=0]) # Indranil Ghosh, May 25 2017

Formula

a(n) = A112053(A112054(n)).

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

A112047 Bisection of A112046.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Programs

  • Mathematica
    a112046[n_]:=Block[{i=1},While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; Table[a112046[2n - 1], {n, 102}] (* Indranil Ghosh, May 11 2017 *)
  • Python
    from sympy import jacobi_symbol as J
    def a112046(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    print([a112046(2*n - 1) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017

Formula

a(n) = A112046(2n-1)

A112048 Bisection of A112046.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Crossrefs

Programs

  • Mathematica
    a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; Table[a112046[2n] , {n, 101}] (* Indranil Ghosh, May 24 2017 *)
  • Python
    from sympy import jacobi_symbol as J
    def a112046(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    def a(n): return a112046(2*n)
    print([a(n) for n in range(1, 102)])  # Indranil Ghosh, May 24 2017

Formula

a(n) = A112046(2n).
Showing 1-5 of 5 results.