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.

Previous Showing 11-20 of 380 results. Next

A057508 Self-inverse permutation of natural numbers induced by the function 'reverse' (present in programming languages like Lisp, Scheme, Prolog and Haskell) when it acts on symbolless S-expressions encoded by A014486/A063171.

Original entry on oeis.org

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

Views

Author

Antti Karttunen Sep 03 2000

Keywords

Crossrefs

The car/cdr-flipped conjugate of A069769, i.e. A057508(n) = A057163(A069769(A057163(n))). Cf. also A057164, A057509, A057510, A033538.

Programs

  • Maple
    Similar function for Maple lists can be implemented as: reverse := proc(a) if 0 = nops(a) then (a) else [op(reverse(cdr(a))),a[1]]; fi; end;

A057511 Permutation of natural numbers: rotations of all branches of the rooted plane trees encoded by A014486.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 03 2000

Keywords

Crossrefs

Inverse permutation: A057512. Cycle counts: A057513. Number of fixed objects: A057546. Max. cycle lengths are given by Landau's function A000793.

Programs

  • Maple
    # See A057509 for rotateL, A057501 for other procedures.
    map(CatalanRankGlobal,map(DeepRotateL, A014486));
    DeepRotateL := n -> pars2binexp(deeprotateL(binexp2pars(n)));
    deeprotateL := proc(a) if 0 = nops(a) or list <> whattype(a) then (a) else rotateL(map(deeprotateL,a)); fi; end;

A057512 Permutation of natural numbers: rotations of all branches of the rooted plane trees encoded by A014486. (to opposite direction of A057511).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 03 2000

Keywords

Crossrefs

Inverse permutation: A057511. Cycle counts: A057513.

Programs

  • Maple
    # See A057510 for rotateR, A057501 for other procedures.
    map(CatalanRankGlobal,map(DeepRotateR, A014486));
    DeepRotateR := n -> pars2binexp(deeprotateR(binexp2pars(n)));
    deeprotateR := proc(a) if 0 = nops(a) or list <> whattype(a) then (a) else rotateR(map(deeprotateR,a)); fi; end;

A127301 Matula-Goebel signatures for plane general trees encoded by A014486.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 6, 7, 5, 16, 12, 12, 14, 10, 12, 9, 14, 19, 13, 10, 13, 17, 11, 32, 24, 24, 28, 20, 24, 18, 28, 38, 26, 20, 26, 34, 22, 24, 18, 18, 21, 15, 28, 21, 38, 53, 37, 26, 37, 43, 29, 20, 15, 26, 37, 23, 34, 43, 67, 41, 22, 29, 41, 59, 31, 64, 48, 48, 56, 40, 48, 36
Offset: 0

Views

Author

Antti Karttunen, Jan 16 2007

Keywords

Comments

This sequence maps A000108(n) oriented (plane) rooted general trees encoded in range [A014137(n-1)..A014138(n)] of A014486 to A000081(n+1) distinct non-oriented rooted general trees, encoded by their Matula-Goebel numbers. The latter encoding is explained in A061773.
A005517 and A005518 give the minimum and maximum value occurring in each such range.
Primes occur at positions given by A057548 (not in order, and with duplicates), and similarly, semiprimes, A001358, occur at positions given by A057518, and in general, A001222(a(n)) = A057515(n).
If the signature-permutation of a Catalan automorphism SP satisfies the condition A127301(SP(n)) = A127301(n) for all n, then it preserves the non-oriented form of a general tree, which implies also that it is Łukasiewicz-word permuting, satisfying A129593(SP(n)) = A129593(n) for all n >= 0. Examples of such automorphisms include A072796, A057508, A057509/A057510, A057511/A057512, A057164, A127285/A127286 and A127287/A127288.
A206487(n) tells how many times n occurs in this sequence. - Antti Karttunen, Jan 03 2013

Examples

			A000081(n+1) distinct values occur each range [A014137(n-1)..A014138(n-1)]. As an example, A014486(5) = 44 (= 101100 in binary = A063171(5)), encodes the following plane tree:
.....o
.....|
.o...o
..\./.
...*..
Matula-Goebel encoding for this tree gives a code number A000040(1) * A000040(A000040(1)) = 2*3 = 6, thus a(5)=6.
Likewise, A014486(6) = 50 (= 110010 in binary = A063171(6)) encodes the plane tree:
.o
.|
.o...o
..\./.
...*..
Matula-Goebel encoding for this tree gives a code number A000040(A000040(1)) * A000040(1) = 3*2 = 6, thus a(6) is also 6, which shows these two trees are identical if one ignores their orientation.
		

Crossrefs

a(A014138(n)) = A007097(n+1), a(A014137(n)) = A000079(n+1) for all n.
a(|A106191(n)|) = A033844(n-1) for all n >= 1.
For standard instead of binary encoding we have A358506.
A000108 counts ordered rooted trees, unordered A000081.
A014486 lists binary encodings of ordered rooted trees.

Programs

  • Mathematica
    mgnum[t_]:=If[t=={},1,Times@@Prime/@mgnum/@t];
    binbalQ[n_]:=n==0||With[{dig=IntegerDigits[n,2]},And@@Table[If[k==Length[dig],SameQ,LessEqual][Count[Take[dig,k],0],Count[Take[dig,k],1]],{k,Length[dig]}]];
    bint[n_]:=If[n==0,{},ToExpression[StringReplace[StringReplace[ToString[IntegerDigits[n,2]/.{1->"{",0->"}"}],","->""],"} {"->"},{"]]];
    Table[mgnum[bint[n]],{n,Select[Range[0,1000],binbalQ]}] (* Gus Wiseman, Nov 22 2022 *)
  • Scheme
    (define (A127301 n) (*A127301 (A014486->parenthesization (A014486 n)))) ;; A014486->parenthesization given in A014486.
    (define (*A127301 s) (if (null? s) 1 (fold-left (lambda (m t) (* m (A000040 (*A127301 t)))) 1 s)))

Formula

A001222(a(n)) = A057515(n) for all n.

A122242 a(n) = A014486(A122241(n)).

Original entry on oeis.org

42, 240, 916, 3748, 14960, 62104, 248176, 969304, 3876576, 15962544, 63772488, 248169896, 993554240, 4086635408, 16350541128, 63529835824, 254129143040, 1046249323840, 4184725760584, 16276030608712, 65054467548432, 267635134298624
Offset: 1

Views

Author

Antti Karttunen, Sep 14 2006

Keywords

Comments

Question: to which Wolfram's class does this simple program belong, class 3 or class 4, or is such categorization at all applicable here?

Crossrefs

Cf. A014486, A057548, A082358, A122237, A122241, A122243 (same sequence in binary).
Compare to similar Wolframesque plots given in A080070, A122229, A122232, A122235, A122239, A122245.
Cf. also A376402, A376412.

Programs

  • Python
    # See the Links section

Formula

For n >= 1, a(1+n) = 2*a(n) XOR A376402(n), a(4+n) = 16*a(n) XOR A376412(n). - Antti Karttunen, Sep 23 2024

A122245 a(n) = A014486(A122244(n)).

Original entry on oeis.org

44, 232, 920, 3876, 14936, 60568, 248240, 996440, 3876264, 15524272, 63773584, 255477160, 993549616, 3970767760, 16350559552, 65386339632, 254129067336, 1016476056896, 4184726043136, 16740063237448, 65054466609736, 260416091191808
Offset: 1

Views

Author

Antti Karttunen, Sep 14 2006

Keywords

Comments

Questions: to which Wolfram's class does this simple program belong, class 3 or class 4? (Is that classification applicable here? This is not 1D CA, although it may look like one).
Does the "central skyscraper" continue widening forever? (see the image for up to 16384th generation) At what specific points it widens? (A new sequence for that). How does that differ from A122242 and similar sister sequences, with different starting conditions?
Related comments in A179777.

Crossrefs

A122246 shows the same sequence in binary. Compare to similar Wolframesque plots given in A080070, A122229, A122232, A122235, A122239, A122242, A179755, A179757. Cf. also A179777, A179762, A179417.

A089859 Permutation of natural numbers induced by Catalan Automorphism *A089859 acting on the binary trees/parenthesizations encoded by A014486/A063171.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2003

Keywords

Comments

This automorphism effects the following transformation on the unlabeled rooted plane binary trees (letters A, B, C refer to arbitrary subtrees located on those nodes and () stands for an implied terminal node).
.....B...C.......C...B
......\./.........\./
...A...x...-->... .x...A...............A..().........()..A..
....\./.............\./.................\./....-->....\./...
.....x...............x...................x.............x....
(a . (b . c)) --> ((c . b) . a) ___ (a . ()) --> (() . a)
See the Karttunen OEIS-Wiki link for a detailed explanation of how to obtain a given integer sequence from this definition.

Crossrefs

Row 15 of A089840. Inverse of A089863. a(n) = A089854(A069770(n)) = A069770(A089850(n)). A089864 is the "square" of this permutation.
Number of cycles: A089407. Max. cycle size & LCM of all cycle sizes: A040002 (in each range limited by A014137 and A014138).

Extensions

A graphical description and constructive implementation of Scheme-function (*A089859) added by Antti Karttunen, Jun 04 2011

A057123 Global ranks of terms of A057122: tells which terms of A014486 form rooted plane binary trees also when interpreted as codes for ordinary rooted planar trees.

Original entry on oeis.org

0, 2, 12, 16, 91, 99, 124, 140, 165, 868, 881, 944, 970, 1014, 1213, 1221, 1364, 1398, 1442, 1633, 1649, 1736, 1887, 9474, 9493, 9619, 9657, 9727, 10317, 10330, 10606, 10657, 10727, 11130, 11156, 11295, 11550, 13452, 13465, 13528, 13554, 13598
Offset: 0

Views

Author

Antti Karttunen, Aug 11 2000

Keywords

Examples

			E.g., we have codes A014486(2) = 10, A014486(12) = 180, A014486(16) = 210, A014486(91) = 2920, for which the corresponding mountain ranges are:
................................./\/\
......../\/\...../\/\........./\/____\
/\/\./\/____\.../____\/\.../\/________\
and corresponding trees have degree 3 in all non-leaf, non-root vertices:
...............................0.0
........0.0......0.0..........0.1.
0.0....0.1........1.0........0.1..
.1......1..........1..........1...
		

Programs

  • Maple
    map(CatalanRankGlobal, A057122)

A089851 Permutation of natural numbers induced by Catalan automorphism *A089851 acting on the binary trees/parenthesizations encoded by A014486/A063171.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2003

Keywords

Comments

This automorphism effects the following transformation on the unlabeled rooted plane binary trees (letters A, B, C refer to arbitrary subtrees located on those nodes and () stands for an implied terminal node.)
...B...C...........C...A
....\./.............\./
.A...x....-->....B...x.................A..().........A...()..
..\./.............\./...................\./....-->....\./...
...x...............x.....................x.............x....
(a . (b . c)) -> (b . (c . a)) ____ (a . ()) ---> (a . ())
In terms of S-expressions, this rotates car, cadr and cddr of an S-exp
if its length > 1, otherwise keeps it intact.
Note that the first clause corresponds to generator C of Thompson's groups T and V.
(Cf. also A072796, A074679 and A154121 for other related generators).
See "Catalan Automorphisms" OEIS-Wiki page for a detailed explanation how to obtain a given integer sequence from this definition.

Crossrefs

Inverse of A089853. a(n) = A089850(A072796(n)) = A057163(A089857(A057163(n))). Row 4 of A089840.
Number of cycles: A089847. Number of fixed-points: A089848 (in each range limited by A014137 and A014138).

Extensions

The new mail-address, further comments and constructive implementation of Scheme-function (*A089851) added by Antti Karttunen, Jun 04 2011

A089863 Permutation of natural numbers induced by Catalan Automorphism *A089863 acting on the binary trees/parenthesizations encoded by A014486/A063171.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2003

Keywords

Comments

This automorphism effects the following transformation on the unlabeled rooted plane binary trees (letters A, B, C refer to arbitrary subtrees located on those nodes and () stands for an implied terminal node).
.A...B...............B...A
..\./.................\./
...x...C...-->.....C...x...............()..A.........A..()..
....\./.............\./.................\./....-->....\./...
.....x...............x...................x.............x....
((a . b) . c) --> (c . (b . a)) __ (() . a) ----> (a . ())
See the Karttunen OEIS-Wiki link for a detailed explanation of how to obtain a given integer sequence from this definition.

Crossrefs

Row 21 of A089840. Inverse of A089859. a(n) = A089850(A069770(n)) = A069770(A089854(n)). A089864 is the "square" of this permutation.
Number of cycles: A089407. Max. cycle size & LCM of all cycle sizes: A040002 (in each range limited by A014137 and A014138).

Extensions

A graphical description and constructive version of Scheme-implementation added by Antti Karttunen, Jun 04 2011
Previous Showing 11-20 of 380 results. Next