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.

A071153 Łukasiewicz word for each rooted plane tree (interpretation e in Stanley's exercise 19) encoded by A014486 (or A063171), with the last leaf implicit, i.e., these words are given without the last trailing zero, except for the null tree which is encoded as 0.

Original entry on oeis.org

0, 1, 20, 11, 300, 201, 210, 120, 111, 4000, 3001, 3010, 2020, 2011, 3100, 2101, 2200, 1300, 1201, 2110, 1210, 1120, 1111, 50000, 40001, 40010, 30020, 30011, 40100, 30101, 30200, 20300, 20201, 30110, 20210, 20120, 20111, 41000, 31001, 31010
Offset: 0

Views

Author

Antti Karttunen, May 14 2002

Keywords

Comments

Note: this finite decimal representation works only up to the 6917th term, as the 6918th such word is already (10,0,0,0,0,0,0,0,0,0). The sequence A071154 shows the initial portion of this sequence sorted.

Examples

			The 11th term of A063171 is 10110010, corresponding to parenthesization ()(())(), thus its Łukasiewicz word is 3010. The 18th term of A063171 is 11011000, corresponding to parenthesization (()(())), thus its Łukasiewicz word is 1201. I.e., in the latter example there is one list on the top-level, which in turn contains two sublists, of which the first is zero elements long and the second is a sublist containing one empty sublist (the last zero is omitted).
		

Crossrefs

For n >= 1, the number of zeros in the term a(n) is given by A057514(n)-1.
The first digit of each term is given by A057515.
Corresponding factorial walk encoding: A071155 (A071157, A071159).
a(n) = A079436(n)/10.

A059984 Concatenation of Łukasiewicz words.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 0, 2, 0, 1, 1, 1, 0, 0, 2, 1, 0, 1, 0, 2, 0, 0, 1, 2, 0, 0, 0, 3, 0, 1, 1, 1, 1, 0, 0, 2, 1, 1, 0, 1, 0, 2, 1, 0, 0, 1, 2, 1, 0, 0, 0, 3, 1, 0, 1, 1, 0, 2, 0, 0, 2, 0, 2, 0, 1, 0, 1, 2, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 0, 1, 0, 0, 3, 0, 0, 1, 0, 3, 0, 0, 0, 1, 3, 0, 0, 0, 0, 4, 0, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Mar 07 2001

Keywords

Comments

There are A000108(n-1) (Catalan numbers) Łukasiewicz words of length n.
The first occurrence of n in this sequence is a(A006134(n)-1).

Examples

			Łukasiewicz words: 0 01 011 002 0111 0021 0102 0012 0003 01111 00211 01021 00121 00031 01102 00202 01012 00112 00022 01003 00103 00013 00004 ...
		

Crossrefs

Cf. A059985.

A079436 Full Łukasiewicz word for each rooted plane tree (interpretation e in Stanley's exercise 19) encoded by A014486 (or A063171).

Original entry on oeis.org

0, 10, 200, 110, 3000, 2010, 2100, 1200, 1110, 40000, 30010, 30100, 20200, 20110, 31000, 21010, 22000, 13000, 12010, 21100, 12100, 11200, 11110, 500000, 400010, 400100, 300200, 300110, 401000, 301010, 302000, 203000, 202010, 301100, 202100
Offset: 0

Views

Author

Antti Karttunen, Jan 09 2003

Keywords

Comments

Note: Here the last leaf is explicit, i.e. the terms are obtained from those of A071153 by multiplying them by 10.
Note: this finite decimal representation works only up to the 6917th term, as the 6918th such word is already "x0000000000" (where x stands for digit "ten").

Crossrefs

a(n) = 10*A071153(n).
For n > 1, the number of zeros in the term a(n) is given by A057514(n).
The first digit of each term is given by A057515.

A071152 Łukasiewicz words for the rooted plane binary trees (interpretation d in Stanley's exercise 19) with the last leaf implicit, i.e., these words are given without the last trailing zero, except for the null tree which is encoded as 0.

Original entry on oeis.org

0, 20, 2020, 2200, 202020, 202200, 220020, 220200, 222000, 20202020, 20202200, 20220020, 20220200, 20222000, 22002020, 22002200, 22020020, 22020200, 22022000, 22200020, 22200200, 22202000, 22220000, 2020202020, 2020202200
Offset: 0

Views

Author

Antti Karttunen, May 14 2002

Keywords

Crossrefs

Programs

  • Mathematica
    balancedQ[0] = True; balancedQ[n_] := (s = 0; Do[s += If[b == 1, 1, -1]; If[s < 0, Return[False]], {b, IntegerDigits[n, 2]}]; Return[s == 0]); 2*FromDigits /@ IntegerDigits[ Select[Range[0, 684], balancedQ], 2] (* Jean-François Alcover, Jul 24 2013 *)
    Array[Map[FromDigits[# /. -1->0]*20 &, Select[Permutations[Join[Table[-1, #-1], Table[1,#]]], Min[Accumulate[#]] >=0 &]]&, 6, 0] (* Paolo Xausa, Mar 12 2024 *)
  • Python
    from itertools import count, islice
    from sympy.utilities.iterables import multiset_permutations
    def A071152_gen(): # generator of terms
        yield 0
        for l in count(1):
            for s in multiset_permutations('0'*l+'1'*(l-1)):
                c, m = 0, (l<<1)-1
                for i in range(m):
                    if s[i] == '1':
                        c += 2
                    if cA071152_list = list(islice(A071152_gen(),30)) # Chai Wah Wu, Nov 28 2023

Formula

a(n) = 2*A063171(n).
Showing 1-4 of 4 results.