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.

A355504 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, among the decimal digits of n and a(n) (counted with multiplicity) there are as many even digits as odd digits.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 05 2022

Keywords

Comments

Leading zeros for positive integers are ignored.
This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			Some terms alongside the corresponding even and odd digits are:
    n    a(n)  even   odd
    ---  ----  -----  -----
      0     1      0      1
      1     0      0      1
      2     3      2      3
      3     2      2      3
      4     5      4      5
      5     4      4      5
      6     7      6      7
      7     6      6      7
      8     9      8      9
      9     8      8      9
     10    10     00     11
     11    20     20     11
     12    12     22     11
     13    22     22     13
     14    14     44     11
    ...   ...    ...    ...
     90    90     00     99
     91  1000    000    911
     92    92     22     99
     93  1002    002    931
     94    94     44     99
     95  1004    004    951
     96    96     66     99
     97  1006    006    971
     98    98     88     99
     99  1008    008    991
    100   101    000    111
		

Crossrefs

Cf. A227870 (fixed points), A352546, A352547, A352760.

Programs

  • PARI
    See Links section.

Formula

a(n) = n iff n belongs to A227870.
a(n) belongs to A352546 iff n belongs to A352547 and vice versa.