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

A373696 a(n) is the least m >= 0 with the same number of digits as n such that for some permutation p of 0..9, applying p to the digits of n yields the digits of m.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10
Offset: 0

Views

Author

Rémy Sigrist, Aug 04 2024

Keywords

Comments

Leading zeros are ignored.
For n > 0, a(n) is the least m > 0 such that A358497(n) = A358497(m).
All positive terms belong to A266946.

Examples

			For n = 65507668: the different digits appearing in 65507668 are 6, 5, 0, 7 and 8; so we replace 6's by 1's, 5's by 0's, 0's by 2's, 7's by 3's and 8's by 4's, and a(65507668) = 10023114.
		

Crossrefs

Cf. A137564, A266946, A358497, A373712 (ternary analog).

Programs

  • PARI
    a(n, base = 10) = { my (d = digits(n, base), m = vector(base, i, -1), u = 1); for (i = 1, #d, if (m[1+d[i]] < 0, m[1+d[i]] = u; u = if (u==1, 0, u==0, 2, u+1);); d[i] = m[1+d[i]];); fromdigits(d, base); }

Formula

a(n) <= n with equality iff n = 0 or n belongs to A266946.
a(a(n)) = a(n).
Showing 1-1 of 1 results.