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.

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.

This page as a plain text file.
%I A373696 #9 Aug 06 2024 09:57:29
%S A373696 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,
%T A373696 10,10,10,10,10,10,10,11,10,10,10,10,10,10,10,10,10,10,11,10,10,10,10,
%U A373696 10,10,10,10,10,10,11,10,10,10,10,10,10,10,10,10,10,11,10
%N 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.
%C A373696 Leading zeros are ignored.
%C A373696 For n > 0, a(n) is the least m > 0 such that A358497(n) = A358497(m).
%C A373696 All positive terms belong to A266946.
%F A373696 a(n) <= n with equality iff n = 0 or n belongs to A266946.
%F A373696 a(a(n)) = a(n).
%e A373696 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.
%o A373696 (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); }
%Y A373696 Cf. A137564, A266946, A358497, A373712 (ternary analog).
%K A373696 nonn,base
%O A373696 0,11
%A A373696 _Rémy Sigrist_, Aug 04 2024