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

A298991 Indices i in A112058 where records of 17*i - 3*A112058(i)/8 occur.

Original entry on oeis.org

2, 5, 13, 21, 24, 32, 40, 43, 51, 1470, 1478, 2701, 12032, 12040, 12048, 12051, 12059, 12067, 12070, 12078, 13301, 14524, 14683, 14691, 14699, 14702, 14710, 14718, 14721, 14729
Offset: 1

Views

Author

A.H.M. Smeets, Jan 31 2018

Keywords

Crossrefs

Programs

  • Python
    i, n, rec = 0, 0, 0
    while n < 1000:
        i = i+1
        if 17*i-3*A112058(i)//8 > rec:
            n, rec = n+1, 17*i-3*A112058(i)//8
            print(n,i)

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

A112056 Odd numbers of the form 4n-1 for which Jacobi-first-non-one(4n-1) differs from Jacobi-first-non-one(4n+1).

Original entry on oeis.org

47, 71, 119, 167, 191, 287, 311, 359, 407, 431, 479, 527, 551, 647, 671, 719, 767, 791, 839, 887, 911, 959, 1007, 1031, 1127, 1151, 1199, 1247, 1271, 1319, 1367, 1391, 1487, 1511, 1559, 1607, 1631, 1679, 1727, 1751, 1799, 1847, 1871, 1967
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

Here Jacobi-first-non-one(m) (for odd numbers m) is defined as the first value of i >= 1, for which Jacobi symbol J(i,m) is not +1 (i.e. is either 0 or -1).

Crossrefs

Programs

  • Mathematica
    a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; 4*Select[Range[1000], a112046[2#] - a112046[2# - 1] != 0 &] - 1 (* 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([4*n - 1 for n in range(1, 1001) if a(n)!=0]) # Indranil Ghosh, May 24 2017

Formula

a(n) = 4*A112054(n)-1.
a(n) = A112057(n)-2 = A112058(n)-1.

A112057 Odd numbers of the form 4n+1 for which Jacobi-first-non-one(4n-1) differs from Jacobi-first-non-one(4n+1).

Original entry on oeis.org

49, 73, 121, 169, 193, 289, 313, 361, 409, 433, 481, 529, 553, 649, 673, 721, 769, 793, 841, 889, 913, 961, 1009, 1033, 1129, 1153, 1201, 1249, 1273, 1321, 1369, 1393, 1489, 1513, 1561, 1609, 1633, 1681, 1729, 1753, 1801, 1849, 1873, 1969
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

The definition of Jacobi-first-non-one is given in A112056.

Crossrefs

a(n) = A112056(n)+2 = A112058(n)+1.

Programs

  • Mathematica
    a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; 4*Select[Range[1000], a112046[2#] - a112046[2# - 1] != 0 &] + 1 (* Indranil Ghosh, May 25 2017 *)
  • PARI
    jfno(n) = my(k = 1); while(kronecker(k, n) == 1, k++); k;
    lista(nn) = {forstep(n=5, nn, 4, if (jfno(n-2) != jfno(n), print1(n, ", ")););} \\ Michel Marcus, Jan 30 2018

Formula

a(n) = 4*A112054(n) + 1.
Showing 1-4 of 4 results.