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.
%I A353829 #8 May 10 2022 02:26:19 %S A353829 0,1,2,3,4,7,6,5,8,9,10,11,12,13,22,21,20,19,18,17,14,15,16,25,24,23, %T A353829 26,27,28,29,30,31,34,33,32,35,36,37,38,39,40,67,66,65,64,63,62,59,60, %U A353829 61,58,57,56,55,54,53,50,51,52,43,42,41,44,45,46,47,48,49 %N A353829 Inverse permutation to A353828. %H A353829 Rémy Sigrist, <a href="/A353829/b353829.txt">Table of n, a(n) for n = 0..6561</a> %H A353829 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A353829 A353828(7) = 5, so a(5) = 7. %o A353829 (PARI) a(n) = { %o A353829 my (d=[], t, p=1); %o A353829 while (n, d=concat(t=[0, 1, -1][1+n%3], d); n=(n-t)/3); %o A353829 for (k=1, #d, if (d[k], p*=d[k]=p*d[k])); %o A353829 fromdigits(d, 3); %o A353829 } %Y A353829 Cf. A353828. %K A353829 nonn,base %O A353829 0,3 %A A353829 _Rémy Sigrist_, May 08 2022