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 A368160 #11 Dec 16 2023 13:10:36 %S A368160 0,1,2,3,6,7,4,5,6,7,15,16,18,19,21,22,24,25,48,49,52,53,56,57,8,9,10, %T A368160 11,33,34,12,13,14,15,42,43,45,46,48,49,51,52,112,113,116,117,120,121, %U A368160 54,55,57,58,60,61,63,64,66,67,69,70,72,73,75,76,78,79 %N A368160 For any n > 0, a(n) is obtained by interpreting the factorial base expansion of n in base m + 1, where m is the maximum digit in the factorial base expansion of n; a(0) = 0. %C A368160 Every nonnegative integer appears finitely many times in this sequence. %H A368160 Rémy Sigrist, <a href="/A368160/b368160.txt">Table of n, a(n) for n = 0..10000</a> %H A368160 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a> %F A368160 a(A059590(n)) = n. %F A368160 a(k!) = 2^(k-1) for any k > 0. %e A368160 For n = 42: the factorial base expansion of 42 is "1300" and has maximum digit 3, so the base-4 expansion of a(42) is "1300", and a(42) = 112. %o A368160 (PARI) a(n) = { my (d = []); for (r = 2, oo, if (n==0, return (if (#d, fromdigits(d, vecmax(d)+1), 0)), d = concat(n%r, d); n \=r;);); } %Y A368160 Cf. A059590, A068505, A246359. %K A368160 nonn,base,easy %O A368160 0,3 %A A368160 _Rémy Sigrist_, Dec 14 2023