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

A166272 Numerator of A166100(A166101(n))/A166102(n).

Original entry on oeis.org

1, 13, 29, 121, 164, 269, 407, 758, 749, 1093, 1217, 1484, 2459, 2429, 3242, 3671, 4133, 3298, 5132, 6830, 7454, 6749, 9841, 10208, 8158, 10961, 11747, 13364, 15149, 17012, 18983, 15178, 19964, 22139, 18749, 25544, 21869, 27947, 29186
Offset: 1

Views

Author

Antti Karttunen, Oct 13 2009

Keywords

Comments

Conjecture: equal to 3*A166100(A166101(n))/A166102(n), i.e. the denominator of the quotient A166100(A166101(n))/A166102(n) in its reduced form is always 3.

Crossrefs

Cf. A166272.

A166100 Sum of those positive i <= 2n+1, for which J(i,2n+1)=+1. Here J(i,k) is the Jacobi symbol.

Original entry on oeis.org

1, 1, 5, 7, 27, 22, 39, 15, 68, 76, 63, 92, 250, 117, 203, 186, 165, 175, 333, 156, 410, 430, 270, 423, 1029, 357, 689, 440, 513, 767, 915, 504, 780, 1072, 759, 994, 1314, 725, 1155, 1343, 2187, 1577, 1360, 957, 1958, 1547, 1395, 1330, 2328, 1485, 2525
Offset: 0

Views

Author

Antti Karttunen, Oct 13 2009. Erroneous name corrected Oct 20 2009

Keywords

Comments

Note that this sequence is not equal to the sum of the quadratic residues of 2n+1 in range [1,2n+1], and thus NOT a bisection of A165898.

Examples

			For n=5, we get odd number 11 (2*5+1), and J(i,11) = 1,-1,1,1,1,-1,-1,-1,1,-1,0 when i ranges from 1 to 11, J(i,11) getting value 1 when i=1, 3, 4, 5 and 9, thus a(5)=22.
		

Crossrefs

Scheme-code for jacobi-symbol is given at A165601.

Programs

  • Mathematica
    Table[Total[Flatten[Position[JacobiSymbol[Range[2n+1],2n+1],1]]],{n,0,50}] (* Harvey P. Dale, Jun 19 2013 *)
  • Python
    from sympy import jacobi_symbol as J
    def a(n): return sum([i for i in range(1, 2*n + 2) if J(i, 2*n + 1)==1]) # Indranil Ghosh, Jun 12 2017

A166406 a(n) = A166405(n)-A166100(n).

Original entry on oeis.org

-1, 1, 0, 7, -27, 11, 0, 30, 0, 19, 0, 69, -250, 9, 0, 93, 0, 70, 0, 156, 0, 43, 0, 235, -1029, 102, 0, 220, 0, 177, 0, 126, 0, 67, 0, 497, 0, 50, 0, 395, -2187, 249, 0, 522, 0, 182, 0, 760, 0, 0, 0, 515, 0, 321, 0, 888, 0, 230, 0, 1190, -6655, 246, 0, 635, 0, 655, 0
Offset: 0

Views

Author

Antti Karttunen, Oct 21 2009, Oct 22 2009

Keywords

Comments

Zeros occur at (A166409(k)-1)/2. The negative terms occur at positions given by A046092 (see the comment at A166040).
Sum of those positive i <= 2n+1, for which J(i,2n+1)=-1 minus sum of those positive i <= 2n+1, for which J(i,2n+1)=+1. Here J(i,k) is the Jacobi symbol.

Crossrefs

A125615(n)=a(A102781(n)). Cf. A166100, A166407-A166409. The cases where a(i)/A005408(i) is not integer seem also to be given by A166101.

Programs

  • Python
    from sympy import jacobi_symbol as J
    def a(n):
        l=0
        m=0
        for i in range(1, 2*n + 2):
            if J(i, 2*n + 1)==-1: l+=i
            elif J(i, 2*n + 1)==1: m+=i
        return l - m
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 12 2017

A166102 Odd numbers k such that A166100((k-1)/2)/k is not an integer.

Original entry on oeis.org

3, 27, 75, 243, 363, 675, 867, 1587, 1875, 2187, 2523, 3267, 5043, 6075, 6627, 7803, 8427, 9075, 10443, 14283, 15123, 16875, 19683, 20667, 21675, 22707, 23763, 29403, 30603, 34347, 38307, 39675, 43923, 45387, 46875, 51483, 54675
Offset: 1

Views

Author

Antti Karttunen, Oct 13 2009

Keywords

Comments

Conjecture: a(n) = 3*A166103(n). (Checked for terms a(1)-a(92).)

Crossrefs

a(n) = A005408(A166101(n)). Cf. A166272.

A166405 Sum of those positive i <= 2n+1, for which J(i,2n+1)=-1. Here J(i,k) is the Jacobi symbol.

Original entry on oeis.org

0, 2, 5, 14, 0, 33, 39, 45, 68, 95, 63, 161, 0, 126, 203, 279, 165, 245, 333, 312, 410, 473, 270, 658, 0, 459, 689, 660, 513, 944, 915, 630, 780, 1139, 759, 1491, 1314, 775, 1155, 1738, 0, 1826, 1360, 1479, 1958, 1729, 1395, 2090, 2328, 1485, 2525, 2884
Offset: 0

Views

Author

Antti Karttunen, Oct 21 2009

Keywords

Examples

			For n=5, we get odd number 11 (2*5+1), and J(i,11) = 1,-1,1,1,1,-1,-1,-1,1,-1,0 when i ranges from 1 to 11, J(i,11) obtaining value -1 when i=2, 6, 7, 8 and 10, thus a(5)=33.
		

Crossrefs

A125615(n)=a(A102781(n)). Cf. A166100, A166406-A166408. The cases where a(i)/A005408(i) is not integer seem also to be given by A166101. This is NOT a bisection of A165898. Scheme-code for jacobi-symbol is given at A165601.

Programs

  • Mathematica
    Table[Total@ Select[Range[2n + 1], JacobiSymbol[#, 2n + 1]==-1 &], {n, 0, 100}] (* Indranil Ghosh, Jun 12 2017 *)
  • Python
    from sympy import jacobi_symbol as J
    def a(n): return sum(i for i in range(1, 2*n + 2) if J(i, 2*n + 1)==-1)
    # Indranil Ghosh, Jun 12 2017

A166407 a(n) = floor(3*(A166406(n)/A005408(n))).

Original entry on oeis.org

-3, 1, 0, 3, -9, 3, 0, 6, 0, 3, 0, 9, -30, 1, 0, 9, 0, 6, 0, 12, 0, 3, 0, 15, -63, 6, 0, 12, 0, 9, 0, 6, 0, 3, 0, 21, 0, 2, 0, 15, -81, 9, 0, 18, 0, 6, 0, 24, 0, 0, 0, 15, 0, 9, 0, 24, 0, 6, 0, 30, -165, 6, 0, 15, 0, 15, 0, 6, 0, 9, 0, 30, 0, 0, 0, 21, 0, 12, 0, 30, 0, 3, 0, 33, -234, 6, 0, 6
Offset: 0

Views

Author

Antti Karttunen, Oct 21 2009

Keywords

Comments

Conjecture: the quotient A166406(i)/A005408(i) has denominator 3 when i is one of the terms of A166101, and it is integral in other cases. If true, then floor in the formula is unnecessary.

Crossrefs

Cf. A166408.

Programs

  • Python
    from sympy import floor, jacobi_symbol as J
    def a(n):
        l=0
        m=0
        for i in range(1, 2*n + 2):
            if J(i, 2*n + 1)==-1: l+=i
            elif J(i, 2*n + 1)==1: m+=i
        return floor(3*((l - m)/(2*n + 1)))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 12 2017

A166408 a(n) = floor(A166407(n)/3).

Original entry on oeis.org

-1, 0, 0, 1, -3, 1, 0, 2, 0, 1, 0, 3, -10, 0, 0, 3, 0, 2, 0, 4, 0, 1, 0, 5, -21, 2, 0, 4, 0, 3, 0, 2, 0, 1, 0, 7, 0, 0, 0, 5, -27, 3, 0, 6, 0, 2, 0, 8, 0, 0, 0, 5, 0, 3, 0, 8, 0, 2, 0, 10, -55, 2, 0, 5, 0, 5, 0, 2, 0, 3, 0, 10, 0, 0, 0, 7, 0, 4, 0, 10, 0, 1, 0, 11, -78, 2, 0, 2, 0, 5, 0, 8, 0, 2, 0
Offset: 0

Views

Author

Antti Karttunen, Oct 21 2009

Keywords

Comments

See the conjecture in A166407. If true, then a(i) = A166406(i)/A005408(i), whenever i is not in A166101.

Crossrefs

A165951(n)=a(A102781(n)) for n>=2.

Programs

  • Python
    from sympy import floor, jacobi_symbol as J
    def a(n):
        l=0
        m=0
        for i in range(1, 2*n + 2):
            if J(i, 2*n + 1)==-1: l+=i
            elif J(i, 2*n + 1)==1: m+=i
        return floor(3*((l - m)/(2*n + 1)))//3
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 12 2017
Showing 1-7 of 7 results.