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

A376637 The word 1 belongs to the sequence, and whenever a word w belongs to the sequence, then the words consisting of 1's and 2's whose run lengths transform equals w also belong to the sequence.

Original entry on oeis.org

1, 2, 11, 12, 21, 22, 112, 122, 211, 221, 1121, 1122, 1211, 2122, 2211, 2212, 11221, 12112, 12211, 12212, 21121, 21122, 21221, 22112, 112212, 121122, 212211, 221121, 1121122, 1121221, 1122122, 1211221, 1221121, 1221211, 2112122, 2112212, 2122112, 2211211
Offset: 1

Views

Author

Rémy Sigrist, Sep 30 2024

Keywords

Comments

This sequence lists finite smooth words: finite words w composed of 1's and 2's without three or more consecutive equal digits, such that for any k > 0, the k-th iterate of the run lengths transform of w is also a word composed of 1's and 2's without three or more consecutive equal digits.

Examples

			The first terms, alongside their run lengths transform, are:
  n   a(n)  RL(a(n))
  --  ----  --------
   1     1         1
   2     2         1
   3    11         2
   4    12        11
   5    21        11
   6    22         2
   7   112        21
   8   122        12
   9   211        12
  10   221        21
  11  1121       211
  12  1122        22
  13  1211       112
  14  2122       112
  15  2211        22
  16  2212       211
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A376676 a(n) is the unique k such that the run lengths transform of A376637(n) equals A376637(k).

Original entry on oeis.org

1, 1, 2, 3, 3, 2, 5, 4, 4, 5, 9, 6, 7, 7, 6, 9, 10, 11, 8, 13, 13, 8, 11, 10, 15, 12, 12, 15, 14, 21, 16, 17, 19, 18, 18, 19, 17, 16, 21, 14, 23, 22, 24, 20, 20, 24, 22, 23, 27, 28, 25, 26, 26, 25, 28, 27, 38, 30, 29, 34, 33, 32, 32, 33, 34, 29, 30, 38, 37, 36
Offset: 1

Views

Author

Rémy Sigrist, Oct 01 2024

Keywords

Comments

Every positive integer appears twice in this sequence.

Examples

			The first terms, alongside the corresponding terms of A376637, are:
  n   a(n)  A376637(n)  A376637(a(n))
  --  ----  ----------  -------------
   1     1           1              1
   2     1           2              1
   3     2          11              2
   4     3          12             11
   5     3          21             11
   6     2          22              2
   7     5         112             21
   8     4         122             12
   9     4         211             12
  10     5         221             21
  11     9        1121            211
  12     6        1122             22
  13     7        1211            112
  14     7        2122            112
  15     6        2211             22
  16     9        2212            211
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

A376637(a(n)) = A351653(A376637(n)).

A376733 a(1) = 0; for any any n > 1, if A376637(n) starts with a digit 1 then a(n) = 2*a(A376676(n)) otherwise a(n) = 2*a(A376676(n)) + 1.

Original entry on oeis.org

0, 1, 2, 4, 5, 3, 10, 8, 9, 11, 18, 6, 20, 21, 7, 19, 22, 36, 16, 40, 41, 17, 37, 23, 14, 12, 13, 15, 42, 82, 38, 44, 32, 72, 73, 33, 45, 39, 83, 43, 74, 34, 46, 80, 81, 47, 35, 75, 26, 30, 28, 24, 25, 29, 31, 27, 78, 164, 84, 144, 64, 88, 89, 65, 145, 85, 165
Offset: 1

Views

Author

Rémy Sigrist, Oct 03 2024

Keywords

Comments

The binary expansion of a(n) encodes the position of A376637(n) within the binary tree underlying A376676 (see illustration in Links section).
This sequence is a bijection from the positive integers to the nonnegative integers.

Examples

			See illustration in Links section.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

A070939(a(n)) = A376698(n) for any n > 0.
Showing 1-3 of 3 results.