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

A342076 Digits only come in successive pairs (separated or not by a comma).

Original entry on oeis.org

1, 11, 12, 2, 3, 31, 13, 32, 21, 14, 4, 5, 51, 15, 52, 22, 23, 33, 34, 41, 16, 6, 7, 71, 17, 72, 24, 42, 25, 53, 35, 54, 43, 36, 61, 18, 8, 9, 91, 19, 92, 26, 62, 27, 73, 37, 74, 44, 45, 55, 56, 63, 38, 81, 100, 66, 77, 88, 99, 111, 122, 112, 28, 82, 29, 93, 39, 94, 46, 64, 47, 75, 57, 76, 65, 58, 83, 300
Offset: 1

Views

Author

Eric Angelini, Feb 28 2021

Keywords

Comments

The sequence starts with a(1) = 1 and is always extended with the smallest positive integer not yet present that does not lead to a contradiction.
No term can end with an odd number of successive 0.
This is not the sequence A329127 as they diverge at a(55).

Examples

			a(1) = 1 forces the next digit to be a 1 (as digits must come in pairs); the smallest positive integer not yet present that starts with a 1 and does not lead to a contradiction is 11 (as 10, ending with an odd number of 0, is forbidden). Thus, a(2) = 11;
a(3) = 12 as a(3) must start with a 1 (to complete a pair of identical digits), and 12 is the smallest positive integer not yet present that does not lead to a contradiction;
a(4) = 2 as 2 is the smallest positive integer not yet present that starts with a 2 and does not lead to a contradiction; etc.
		

Crossrefs

Cf. A342077, A342078 and A342079 (variations on the same idea), A329127 (first 54 terms are the same).

Programs

  • Python
    mustpair = set(range(10))
    def pairsup(n, offset=0):
      digits = list(map(int, str(n)))[offset:]
      if len(digits) == 0: return True, False
      i = 0
      while i < len(digits) - 1:
        if digits[i] in mustpair:
          if digits[i] != digits[i+1]: return False, None
          else: i += 2
        else: i += 1
      unpaired = digits[-1] in mustpair and i != len(digits)
      return not (unpaired and digits[-1] == 0), unpaired
    def aupton(terms, startswith=1):
      alst, unpaired = [startswith], startswith in mustpair
      for n in range(2, terms+1):
        m = 1
        while True:
          while m in alst: m += 1
          if not unpaired or int(str(m)[0]) == alst[-1]%10:
            passes, temp = pairsup(m, offset=int(unpaired))
            if passes: alst.append(m); unpaired = temp; break
          m += 1
      return alst
    print(aupton(66)) # Michael S. Branicky, Feb 28 2021

A333010 Lexicographically earliest sequence of distinct positive integers such that the concatenation of the binary representations of the odd-indexed terms equals the concatenation of the binary representations of the even-indexed terms.

Original entry on oeis.org

1, 3, 6, 2, 4, 9, 7, 14, 5, 12, 18, 10, 11, 15, 28, 19, 29, 22, 20, 36, 37, 23, 30, 13, 24, 8, 16, 33, 25, 38, 21, 44, 39, 31, 56, 17, 26, 42, 40, 34, 41, 76, 72, 35, 57, 77, 45, 46, 27, 58, 43, 59, 47, 60, 50, 80, 66, 81, 70, 82, 74, 83, 78, 84, 164, 73, 79
Offset: 1

Views

Author

Rémy Sigrist, Mar 05 2020

Keywords

Comments

In other words, the first and second bisections have the same binary digits.
This sequence is a binary variant of A329127.

Examples

			The first terms, alongside their binary representation, are:
  n   a(n)  bin(a(n))
  --  ----  -----------------------------
   1     1  1
   2     3  11
   3     6   110
   4     2    10
   5     4      100
   6     9      1001
   7     7         111
   8    14          1110
   9     5            101
  10    12              1100
  11    18               10010
  12    10                  1010
  13    11                    1011
  14    15                      1111
  15    28                        11100
  16    19                          10011
		

Crossrefs

Cf. A329127.

Programs

  • PARI
    See Links section.

A363931 Square array of distinct positive integers A(n, k), n, k > 0, read and filled the greedy way by antidiagonals upwards such that the concatenations of the terms of two distinct rows are always equal.

Original entry on oeis.org

1, 11, 12, 112, 2, 3, 1123, 31, 311, 111, 11231, 1111, 1112, 1121, 121, 112311, 11121, 21, 13, 32, 321, 1123111, 11213, 3211, 32111, 211, 1113, 113, 11231111, 1213, 2111, 131, 312, 1312, 122, 1221, 112311112, 213, 21113, 3122, 22, 212, 2121, 1211, 2112
Offset: 1

Views

Author

Rémy Sigrist, Jun 28 2023

Keywords

Comments

Leading zeros are ignored.
Will every positive integer appear?

Examples

			Array A(n, k) begins:
  n\k|       1      2      3      4       5       6       7
  ---+-----------------------------------------------------
    1|       1     12      3    111     121     321     113
    2|      11      2    311   1121      32    1113     122
    3|     112     31   1112     13     211    1312    2121
    4|    1123   1111     21  32111     312     212   11211
    5|   11231  11121   3211    131      22  121121  111112
    6|  112311  11213   2111   3122   12112  111111     222
    7| 1123111   1213  21113  12212  112111  111222    3131
.
Array A(n, k), with digits vertically aligned, begins:
    +-+---+-+-----+-----+-----+-----+-------+-------+---------+
    |1|1 2|3|1 1 1|1 2 1|3 2 1|1 1 3|1 2 2 1|2 1 1 2|1 1 1 1 1|
    +-+-+-+-+---+-+-----+---+-+-----+-----+-+-----+-+-------+-+-----+
    |1 1|2|3 1 1|1 1 2 1|3 2|1 1 1 3|1 2 2|1 2 1 1|2 1 1 1 1|1 1 2 2|
    +---+-+---+-+-----+-+-+-+---+---+---+-+-----+-+-------+-+-------+
    |1 1 2|3 1|1 1 1 2|1 3|2 1 1|1 3 1 2|2 1 2 1|1 2 1 1 1|1 1 1 2 2|
    +-----+-+-+-----+-+-+-+-----+-+-----+-----+-+-------+-+-------+-+
    |1 1 2 3|1 1 1 1|2 1|3 2 1 1 1|3 1 2|2 1 2|1 1 2 1 1|1 1 1 1 2|
    +-------+-+-----+---+-------+-+---+-+-+---+-------+-+---------+
    |1 1 2 3 1|1 1 1 2 1|3 2 1 1|1 3 1|2 2|1 2 1 1 2 1|1 1 1 1 1 2|
    +---------+-+-------+-+-----+-+---+---+---------+-+---------+-+
    |1 1 2 3 1 1|1 1 2 1 3|2 1 1 1|3 1 2 2|1 2 1 1 2|1 1 1 1 1 1|
    +-----------+-+-------+-------+-+-----+---+-----+-----+-----+-----+
    |1 1 2 3 1 1 1|1 2 1 3|2 1 1 1 3|1 2 2 1 2|1 1 2 1 1 1|1 1 1 2 2 2|
    +-------------+-------+---------+---------+-----------+-----------+
		

Crossrefs

A363932 Square array of distinct positive integers A(n, k), n, k > 0, read and filled the greedy way by antidiagonals downwards such that the concatenations of the terms of two distinct rows are always equal.

Original entry on oeis.org

1, 2, 12, 3, 31, 123, 11, 13, 113, 1231, 32, 21, 211, 132, 12311, 111, 112, 121, 1112, 321, 123113, 212, 122, 22, 1221, 1121, 2111, 1231132, 213, 131, 1311, 311, 221, 2122, 11121, 12311321, 114, 14, 4, 41, 3114, 13114, 2213, 11212, 123113211, 15, 151, 1511, 5, 15111, 151111, 1141, 2131, 1212, 1231132111
Offset: 1

Views

Author

Rémy Sigrist, Jun 28 2023

Keywords

Comments

Leading zeros are ignored.
Will every positive integer appear?

Examples

			Array A(n, k) begins:
  n\k|        1      2     3      4       5      6       7       8
  ---+------------------------------------------------------------
    1|        1      2     3     11      32    111     212     213
    2|       12     31    13     21     112    122     131      14
    3|      123    113   211    121      22   1311       4    1511
    4|     1231    132  1112   1221     311     41       5   11113
    5|    12311    321  1121    221    3114  15111    1312    1122
    6|   123113   2111  2122  13114  151111    312   11221   13111
    7|  1231132  11121  2213   1141      51  11131   21122  113111
    8| 12311321  11212  2131    141     511  11312  112211  311111
.
Array A(n, k), with digits vertically aligned, begins:
    +-+-+-+---+---+-----+-----+-----+-----+---+-------+-------+---------+
    |1|2|3|1 1|3 2|1 1 1|2 1 2|2 1 3|1 1 4|1 5|1 1 1 1|3 1 2 1|1 2 2 1 1|
    +-+-+-+-+-+-+-+-+---+-+---+-+---+-+---+---+-+-----+-+-----+-+-------+
    |1 2|3 1|1 3|2 1|1 1 2|1 2 2|1 3 1|1 4|1 5 1|1 1 1 3|1 2 1 1|2 2 1 1|
    +---+-+-+---+---+-+---+-+---+-----+-+-+-----+-+-----+-+-----+-+-----+
    |1 2 3|1 1 3|2 1 1|1 2 1|2 2|1 3 1 1|4|1 5 1 1|1 1 3 1|2 1 1 2|
    +-----+-+---+-+---+---+-+---+-+-----+-+-+-+---+-----+-+-------+
    |1 2 3 1|1 3 2|1 1 1 2|1 2 2 1|3 1 1|4 1|5|1 1 1 1 3|1 2 1 1 2|
    +-------+-+---+-+-----+-+-----+-----+-+-+-+-----+---+---+-----+-+
    |1 2 3 1 1|3 2 1|1 1 2 1|2 2 1|3 1 1 4|1 5 1 1 1|1 3 1 2|1 1 2 2|
    +---------+-+---+---+---+---+-+-------+---------+-+-----+-------+-+
    |1 2 3 1 1 3|2 1 1 1|2 1 2 2|1 3 1 1 4|1 5 1 1 1 1|3 1 2|1 1 2 2 1|
    +-----------+-+-----+---+---+---+-----+-+---+-----+---+-+-------+-+
    |1 2 3 1 1 3 2|1 1 1 2 1|2 2 1 3|1 1 4 1|5 1|1 1 1 3 1|2 1 1 2 2|
    +-------------+-+-------+-+-----+-+-----+---+-+-------+-+-------+---+
    |1 2 3 1 1 3 2 1|1 1 2 1 2|2 1 3 1|1 4 1|5 1 1|1 1 3 1 2|1 1 2 2 1 1|
    +---------------+---------+-------+-----+-----+---------+-----------+
		

Crossrefs

A377961 Lexicographically earliest sequence of distinct positive integers such that the successive digits of the odd and even bisections are pairwise distinct.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 30, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 40, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 50, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 60, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 70, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 80, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 90, 89, 100, 91, 92, 101
Offset: 1

Views

Author

Rémy Sigrist, Nov 12 2024

Keywords

Examples

			The first terms of the odd and even bisections are:
    odd  |1|3|5|7|9|1 1|1 2|1 4|1 6|1 8|2 1|3 0|2 4|2 6|2 8|3 1|...
    even |2|4|6|8|1 0|2 0|1 3|1 5|1 7|1 9|2 2|2 3|2 5|2 7|2 9|3 2|...
		

Crossrefs

Cf. A329127.

Programs

  • PARI
    \\ See Links section.
Showing 1-5 of 5 results.