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.

User: James Kirk Winkler

James Kirk Winkler's wiki page.

James Kirk Winkler has authored 3 sequences.

A322168 Sequence gives the values of the trace A+D of the 2 X 2 matrices [[A,B],[C,D]] in a binary tree of the special linear monoid, SL(2,Z+).

Original entry on oeis.org

2, 2, 2, 2, 3, 3, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 5, 5, 6, 5, 7, 6, 5, 5, 6, 7, 5, 6, 5, 5, 2, 2, 6, 6, 8, 6, 10, 8, 8, 6, 10, 10, 10, 8, 10, 8, 6, 6, 8, 10, 8, 10, 10, 10, 6, 8, 8, 10, 6, 8, 6, 6, 2, 2, 7, 7, 10, 7, 13, 10, 11, 7, 14, 13, 15, 10, 15, 11, 10, 7, 13, 14, 15, 13, 18, 15, 13, 10, 15, 15, 14, 11, 13, 10, 7, 7, 10, 13, 11, 14, 15, 15, 10, 13, 15, 18, 13, 15, 14, 13, 7, 10, 11, 15, 10, 15, 13, 14, 7, 11, 10, 13, 7, 10, 7, 7, 2
Offset: 1

Author

James Kirk Winkler, Dec 11 2018

Keywords

Comments

Here A,B,C,D are positive integers, in Z+, satisfying A*D-B*C=1.
The SL(2,Z+) monoid may be constructed as a binary tree by starting with the identity matrix, I = [[1,0],[0,1]], then multiply by L = [[1,0],[1,1]] and R = [[1,1],[0,1]] creating the 2nd row in the tree. Multiplying the two elements of the 2nd row by L and R creates the 3rd row. Repeat for each row. See the Python program.
The monoid SL(2,Z+) is isomorphic to the positive rationals Q+. The sum of the rows of an SL(2,Z+) element create a unique reduced fraction, p/q.: [[a,b],[c,d]] => (a+b)/(c+d) = p/q These fractions map to the entries of the Stern-Brocot tree.
SL(2,Z+) is a sub-monoid of SL(2,Z). The generators of SL(2,Z) are [[0,-1],[1,0]] and [[1,1],[0,1]]. The author believes that L and R are generators for SL(2,Z+) and all elements of the monoid are present in the tree.

Examples

			row 1: [[1,0],[0,1]]   trace = 2
row 2: [[1,0],[1,1]], [[1,1],[0,1]]   trace = 2, 2
row 3: [[1,0],[2,1]], [[1,1],[1,2]], [[2,1],[1,1]], [[1,2],[0,1]]   trace = 2, 3, 3, 2
...
Sum the matrix rows for the Stern-Brocot tree.
row 1: 1/1
row 2: 1/2, 2/1
row 3: 1/3, 2/3, 3/2, 3/1
...
		

Programs

  • Mathematica
    row[n_] := Module[{v = Table[0, {2^(n-1)}], L = {{1, 0}, {1, 1}}}, For[k = 0, k <= Length[v]-1, k++, v[[k+1]] = Tr[Dot @@ Table[If[BitGet[k, b] == 1, Transpose[L], L], {b, 0, n-2}]]]; v]; row[1] = {2};
    Array[row, 7] // Flatten (* Jean-François Alcover, Dec 17 2018, after Andrew Howroyd *)
  • PARI
    row(n)={my(v=vector(2^(n-1)), L=[1,0;1,1]); for(k=0, #v-1, v[k+1]=trace(prod(b=0, n-2, if(bittest(k,b), L~, L)))); v}
    { for(n=1, 7, print(row(n))) } \\ Andrew Howroyd, Dec 12 2018
  • Python
    def mul(A, B):
        a = A[0]*B[0] + A[1]*B[2]
        b = A[0]*B[1] + A[1]*B[3]
        c = A[2]*B[0] + A[3]*B[2]
        d = A[2]*B[1] + A[3]*B[3]
        return([a, b, c, d])
    I = [1, 0, 0, 1]
    L = [1, 0, 1, 1]
    R = [1, 1, 0, 1]
    slg = [I]
    a_lst = slg
    for n in range(12):
        b_lst = []
        for ele in a_lst:
            b_lst.append(mul(ele, L))
            b_lst.append(mul(ele, R))
        a_lst = b_lst
        for ele in b_lst:
            slg.append(ele)
    seq = []
    for ele in slg:
        seq.append(ele[0]+ele[3])
    

A261273 Take the list of positive rationals {R(n): n>=1} in the order defined by Calkin and Wilf (Recounting the Rationals, 1999); a(n) = denominator of R(prime(n)).

Original entry on oeis.org

2, 1, 2, 1, 2, 3, 4, 3, 2, 4, 1, 7, 8, 5, 2, 8, 4, 5, 5, 4, 11, 3, 8, 12, 9, 12, 5, 8, 11, 10, 1, 6, 14, 9, 18, 7, 13, 11, 8, 18, 12, 19, 2, 11, 16, 7, 13, 3, 10, 17, 18, 4, 13, 6, 8, 6, 16, 5, 23, 22, 13, 26, 17, 10, 23, 16, 19, 29, 18, 23, 22, 12, 7, 25, 11, 2, 20, 23, 26, 29, 18, 31, 8, 27, 11, 14, 16, 27, 24, 7, 18, 4, 9, 14, 11, 6, 8, 20, 13, 21, 19, 32, 22, 30, 17, 23, 26, 40, 18, 43, 7, 41, 44, 27, 13, 20, 17, 14, 36, 30, 49, 37, 50, 34, 31, 28, 39, 12, 19, 33, 23, 16, 9, 31, 24, 15, 24, 25, 30, 50, 31, 46, 17, 22, 27, 18, 55, 50, 29, 8, 41, 36, 25, 14, 23, 10, 17, 32, 47, 40, 26, 34, 13, 22, 32, 14, 5, 27
Offset: 1

Author

James Kirk Winkler, Aug 13 2015

Keywords

Comments

The list of rationals {R(n)} is essentially given by A002487(n)/A002487(n+1).

Crossrefs

Companion sequence to A261179.

A261179 Take the list of positive rationals {R(n): n>=1} in the order defined by Calkin and Wilf (Recounting the Rationals, 1999); a(n) = numerator of R(prime(n)).

Original entry on oeis.org

1, 2, 3, 3, 5, 5, 5, 7, 7, 7, 5, 11, 11, 13, 9, 13, 11, 9, 11, 13, 15, 13, 19, 17, 11, 19, 17, 21, 19, 13, 7, 13, 19, 23, 29, 25, 23, 25, 27, 31, 29, 31, 13, 13, 25, 23, 31, 17, 23, 27, 25, 19, 17, 17, 9, 19, 27, 21, 37, 31, 35, 41, 41, 37, 33, 29, 49, 37, 49, 41, 27, 41, 33, 41, 31, 15, 31, 39, 33, 41, 41, 49, 37, 35, 41, 39, 19, 37, 41, 31, 43, 23, 31, 37, 27, 23, 15, 27
Offset: 1

Author

James Kirk Winkler, Aug 10 2015

Keywords

Comments

The list of rationals {R(n)} is essentially given by A002487(n)/A002487(n+1).
It appears that a(n) is always odd. This has been checked for all primes up to 999983.

Crossrefs

Subset of A002487.