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

A122201 Signature permutations of FORK-transformations of non-recursive Catalan automorphisms in table A089840.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 2, 2, 1, 0, 5, 8, 3, 2, 1, 0, 6, 7, 4, 3, 2, 1, 0, 7, 6, 6, 5, 3, 2, 1, 0, 8, 5, 5, 4, 5, 3, 2, 1, 0, 9, 4, 7, 6, 6, 6, 3, 2, 1, 0, 10, 22, 8, 7, 4, 5, 6, 3, 2, 1, 0, 11, 21, 9, 8, 7, 4, 4, 4, 3, 2, 1, 0, 12, 20, 11, 12, 8, 7, 5, 5, 4, 3, 2, 1, 0, 13, 18, 14, 13, 12
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2006

Keywords

Comments

Row n is the signature permutation of the Catalan automorphism which is obtained from the n-th nonrecursive automorphism in the table A089840 with the recursion scheme "FORK". In this recursion scheme the given automorphism is first applied at the root of binary tree, before the algorithm recurses down to the both branches (new ones, possibly changed by the given automorphism). I.e. this corresponds to the pre-order (prefix) traversal of a Catalan structure, when it is interpreted as a binary tree. The associated Scheme-procedures FORK and !FORK can be used to obtain such a transformed automorphism from any constructively or destructively implemented automorphism. Each row occurs only once in this table. Inverses of these permutations can be found in table A122202.

References

  • A. Karttunen, paper in preparation, draft available by e-mail.

Crossrefs

The first 22 rows of this table: row 0 (identity permutation): A001477, 1: A057163, 2: A057511, 3: A122341, 4: A122343, 5: A122345, 6: A122347, 7: A122349, 8: A082325, 9: A082360, 10: A122291, 11: A122293, 12: A074681, 13: A122295, 14: A122297, 15: A122353, 16: A122355, 17: A074684, 18: A122357, 19: A122359, 20: A122361, 21: A122301. Other rows: row 4253: A082356, row 65796: A082358, row 79361: A123493.

Programs

  • Scheme
    (define (FORK foo) (letrec ((bar (lambda (s) (let ((t (foo s))) (if (pair? t) (cons (bar (car t)) (bar (cdr t))) t))))) bar))
    (define (!FORK foo!) (letrec ((bar! (lambda (s) (cond ((pair? s) (foo! s) (bar! (car s)) (bar! (cdr s)))) s))) bar!))

A122283 Signature permutations of DEEPEN-transformations of non-recursive Catalan automorphisms in table A089840.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 2, 2, 1, 0, 5, 8, 3, 2, 1, 0, 6, 7, 4, 3, 2, 1, 0, 7, 6, 6, 5, 3, 2, 1, 0, 8, 4, 5, 4, 5, 3, 2, 1, 0, 9, 5, 7, 6, 6, 6, 3, 2, 1, 0, 10, 22, 8, 7, 4, 5, 6, 3, 2, 1, 0, 11, 21, 9, 8, 7, 4, 4, 4, 3, 2, 1, 0, 12, 20, 10, 12, 8, 7, 5, 5, 4, 3, 2, 1, 0, 13, 17, 14, 13, 12
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2006

Keywords

Comments

Row n is the signature permutation of the Catalan automorphism which is obtained from the n-th nonrecursive automorphism in the table A089840 with the recursion scheme "DEEPEN". In this recursion scheme the given automorphism is first applied at the root of general tree, before the algorithm recurses down to all subtrees. I.e., this corresponds to the pre-order (prefix) traversal of a Catalan structure, when it is interpreted as a general tree. The associated Scheme-procedures DEEPEN and !DEEPEN can be used to obtain such a transformed automorphism from any constructively or destructively implemented automorphism. Each row occurs only once in this table. Inverses of these permutations can be found in table A122284.
The recursion scheme FORK (described in A122201) is equivalent to a composition of recursion schemes SPINE (described in A122203) and DEEPEN, i.e., FORK(f) = DEEPEN(SPINE(f)) holds for all Catalan automorphisms f. These recursion schemes have well-defined inverses, that is, they are bijective mappings on the set of all Catalan automorphisms. Thus we can equivalently define that DEEPEN(f) = FORK(SPINE^{-1}(f)). Specifically, if g = SPINE(f), then (f s) = (cond ((pair? s) (let ((t (g s))) (cons (car t) (g^{-1} (cdr t))))) (else s)) that is, to obtain an automorphism f which gives g when subjected to recursion scheme SPINE, we compose g with its own inverse applied to the cdr-branch of a S-expression. This implies that for any non-recursive automorphism f in the table A089840, SPINE^{-1}(f) is also in A089840, which in turn implies that the rows of table A122283 form a (proper) subset of the rows of table A122201. E.g., row 1 of A122283 is row 21 of A122201, row 2 of A122283 is row 3613 of A122201, row 17 of A122283 is row 65352 of A122201, row 21 of A122283 is row 251 of A122201. - Antti Karttunen, May 25 2007

References

  • A. Karttunen, paper in preparation, draft available by e-mail.

Crossrefs

The first 22 rows of this table: row 0 (identity permutation): A001477, 1: A122301, 2: A122300, 3: A122303, 4: A122305, 5: A122307, 6: A122309, 7: A122311, 8: A122313, 9: A122315, 10: A122317, 11: A122319, 12: A122321, 13: A122323, 14: A122325, 15: A122327, 16: A122329, 17: A122331, 18: A122333, 19: A122335, 20: A122337, 21: A122339. See also tables A089840, A122200, A122201-A122204, A122285-A122288, A122289-A122290.

Programs

  • Scheme
    (define (DEEPEN foo) (letrec ((bar (lambda (s) (map bar (foo s))))) bar))
    (define (!DEEPEN foo!) (letrec ((bar! (lambda (s) (foo! s) (for-each bar! s) s))) bar!))

A153141 Permutation of nonnegative integers: A059893-conjugate of A153151.

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 10, 11, 31, 30, 28, 29, 24, 25, 26, 27, 16, 17, 18, 19, 20, 21, 22, 23, 63, 62, 60, 61, 56, 57, 58, 59, 48, 49, 50, 51, 52, 53, 54, 55, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 127, 126, 124, 125, 120, 121
Offset: 0

Views

Author

Antti Karttunen, Dec 20 2008

Keywords

Comments

This permutation is induced by a wreath recursion a = s(a,b), b = (b,b) (i.e., binary transducer, where s means that the bits at that state are toggled: 0 <-> 1) given on page 103 of the Bondarenko, Grigorchuk, et al. paper, starting from the active (swapping) state a and rewriting bits from the second most significant bit to the least significant end, continuing complementing as long as the first 1-bit is reached, which is the last bit to be complemented.
The automorphism group of infinite binary tree (isomorphic to an infinitely iterated wreath product of cyclic groups of two elements) embeds naturally into the group of "size-preserving Catalan bijections". Scheme-function psi gives an isomorphism that maps this kind of permutation to the corresponding Catalan automorphism/bijection (that acts on S-expressions). The following identities hold: *A069770 = psi(A063946) (just swap the left and right subtrees of the root), *A057163 = psi(A054429) (reflect the whole tree), *A069767 = psi(A153141), *A069768 = psi(A153142), *A122353 = psi(A006068), *A122354 = psi(A003188), *A122301 = psi(A154435), *A122302 = psi(A154436) and from *A154449 = psi(A154439) up to *A154458 = psi(A154448). See also comments at A153246 and A153830.
a(1) to a(2^n) is the sequence of row sequency numbers in a Hadamard-Walsh matrix of order 2^n, when constructed to give "dyadic" or Payley sequency ordering. - Ross Drewe, Mar 15 2014
In the Stern-Brocot enumeration system for positive rationals (A007305/A047679), this permutation converts the denominator into the numerator: A007305(n) = A047679(a(n)). - Yosu Yurramendi, Aug 01 2020

Examples

			18 = 10010 in binary and after complementing the second, third and fourth most significant bits at positions 3, 2 and 1, we get 1110, at which point we stop (because bit-1 was originally 1) and fix the rest, so we get 11100 (28 in binary), thus a(18)=28. This is the inverse of "binary adding machine". See pages 8, 9 and 103 in the Bondarenko, Grigorchuk, et al. paper.
19 = 10011 in binary. By complementing bits in (zero-based) positions 3, 2 and 1 we get 11101 in binary, which is 29 in decimal, thus a(19)=29.
		

Crossrefs

Inverse: A153142. a(n) = A059893(A153151(A059893(n))) = A059894(A153152(A059894(n))) = A154440(A154445(n)) = A154442(A154443(n)). Corresponds to A069767 in the group of Catalan bijections. Cf. also A154435-A154436, A154439-A154448, A072376.
Differs from A006068 for the first time at n=14, where a(14)=10 while A006068(14)=11.
A240908-A240910 these give "natural" instead of "dyadic" sequency ordering values for Hadamard-Walsh matrices, orders 8,16,32. - Ross Drewe, Mar 15 2014

Programs

  • Python
    def ok(n): return n&(n - 1)==0
    def a153151(n): return n if n<2 else 2*n - 1 if ok(n) else n - 1
    def A(n): return (int(bin(n)[2:][::-1], 2) - 1)/2
    def msb(n): return n if n<3 else msb(n/2)*2
    def a059893(n): return A(n) + msb(n)
    def a(n): return 0 if n==0 else a059893(a153151(a059893(n))) # Indranil Ghosh, Jun 09 2017
    
  • R
    maxlevel <- 5 # by choice
    a <- 1
    for(m in 1:maxlevel){
    a[2^m    ] <- 2^(m+1) - 1
    a[2^m + 1] <- 2^(m+1) - 2
    for (k in 1:(2^m-1)){
       a[2^(m+1) + 2*k    ] <- 2*a[2^m + k]
       a[2^(m+1) + 2*k + 1] <- 2*a[2^m + k] + 1}
    }
    a <- c(0,a)
    # Yosu Yurramendi, Aug 01 2020

Formula

Conjecture: a(n) = f(a(f(a(A053645(n)))) + A053644(n)) for n > 0 where f(n) = A054429(n) for n > 0 with f(0) = 0. - Mikhail Kurkov, Oct 02 2023
From Mikhail Kurkov, Dec 22 2023: (Start)
a(n) < 2^k iff n < 2^k for k >= 0.
Conjectured formulas:
a(2^m + k) = f(2^m + f(k)) for m >= 0, 0 <= k < 2^m with a(0) = 0.
a(n) = f(A153142(f(n))) for n > 0 with a(0) = 0. (End)

A154435 Permutation of nonnegative integers induced by Lamplighter group generating wreath recursion, variant 3: a = s(b,a), b = (a,b), starting from the state a.

Original entry on oeis.org

0, 1, 3, 2, 6, 7, 5, 4, 13, 12, 14, 15, 10, 11, 9, 8, 26, 27, 25, 24, 29, 28, 30, 31, 21, 20, 22, 23, 18, 19, 17, 16, 53, 52, 54, 55, 50, 51, 49, 48, 58, 59, 57, 56, 61, 60, 62, 63, 42, 43, 41, 40, 45, 44, 46, 47, 37, 36, 38, 39, 34, 35, 33, 32, 106, 107, 105, 104, 109, 108
Offset: 0

Views

Author

Antti Karttunen, Jan 17 2009

Keywords

Comments

This permutation is induced by the third Lamplighter group generating wreath recursion a = s(b,a), b = (a,b) (i.e., binary transducer, where s means that the bits at that state are toggled: 0 <-> 1) given on page 104 of Bondarenko, Grigorchuk, et al. paper, starting from the active (swapping) state a and rewriting bits from the second most significant bit to the least significant end.

Examples

			475 = 111011011 in binary. Starting from the second most significant bit and, as we begin with the swapping state a, we complement the bits up to and including the first zero encountered and so the beginning of the binary expansion is complemented as 1001....., then, as we switch to the inactive state b, the following bits are kept same, again up to and including the first zero encountered, after which the binary expansion is 1001110.., after which we switch again to the active state (state a), which complements the two rightmost 1's and we obtain the final answer 100111000, which is 312's binary representation, thus a(475)=312.
		

Crossrefs

Inverse: A154436. a(n) = A059893(A154437(A059893(n))) = A054429(A006068(A054429(n))). Corresponds to A122301 in the group of Catalan bijections. Cf. also A153141-A153142, A154439-A154448, A072376.

Programs

  • Python
    from sympy import floor
    def a006068(n):
        s=1
        while True:
            ns=n>>s
            if ns==0: break
            n=n^ns
            s<<=1
        return n
    def a054429(n): return 1 if n==1 else 2*a054429(floor(n/2)) + 1 - n%2
    def a(n): return 0 if n==0 else a054429(a006068(a054429(n))) # Indranil Ghosh, Jun 11 2017
    
  • R
    maxn <- 63 # by choice
    a <- c(1,3,2) # If it were a <- 1:3, it would be A180200
    for(n in 2:maxn){
      a[2*n  ] <- 2*a[n] + (a[n]%%2 == 0)
      a[2*n+1] <- 2*a[n] + (a[n]%%2 != 0)  }
    a
    # Yosu Yurramendi, Jun 21 2020

Extensions

Spelling/notation corrections by Charles R Greathouse IV, Mar 18 2010

A071163 A014486-indices for rooted binary trees with height equal to number of internal vertices. (Binary trees where at each internal vertex at least the other child is leaf.)

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 17, 18, 21, 22, 23, 24, 26, 27, 31, 32, 35, 36, 45, 46, 49, 50, 58, 59, 63, 64, 65, 66, 68, 69, 73, 74, 77, 78, 87, 88, 91, 92, 100, 101, 105, 106, 129, 130, 133, 134, 142, 143, 147, 148, 170, 171, 175, 176, 189, 190, 195, 196, 197
Offset: 0

Views

Author

Antti Karttunen, May 14 2002

Keywords

Comments

This subset of integers is closed by the actions of A069770, A057163, A069767, A069768, A122353, A122354, A122301, A122302, etc. (meaning, e.g., that A069767(a(n)) is a member from this sequence for all n), that is, by any Catalan bijection which is an image of some element of the automorphism group of infinite binary tree (the latter in a sense given by Grigorchuk, et al., being isomorphic to an infinitely iterated wreath product of cyclic groups of two elements). See the comments about the isomorphism "psi" given at A153141.
a(n) could be probably computed directly from the binary expansion of n by using a (somewhat) similar ranking function as given in A209640, but utilizing A009766 instead of A007318.

Formula

a(n) = A080300(A071162(n)).

A122302 Row 1 of A122284, row 15 of A122202.

Original entry on oeis.org

0, 1, 3, 2, 7, 8, 6, 5, 4, 17, 18, 20, 22, 21, 16, 19, 15, 12, 13, 14, 11, 10, 9, 45, 46, 48, 50, 49, 54, 55, 61, 63, 64, 57, 62, 59, 58, 44, 47, 53, 60, 56, 43, 52, 40, 31, 32, 41, 34, 36, 35, 42, 51, 39, 30, 33, 38, 29, 26, 27, 37, 28, 25, 24, 23, 129, 130, 132, 134, 133
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2006

Keywords

Comments

The signature-permutation of the automorphism which is derived from the first non-recursive automorphism *A069770 with recursion schema NEPEED (see A122284 for the definition), or equivalently, derived from the fifteenth non-recursive automorphism *A089859 with recursion schema KROF (see A122202 for the definition).

Crossrefs

Inverse: A122301.
Showing 1-6 of 6 results.