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 A382178 #8 Mar 20 2025 09:29:28 %S A382178 2,2,3,3,3,3,4,18,18,17,17,16,4,19,19,18,18,101,4,115,114,110,110,18, %T A382178 5,203,199,192,189,183,28,187,27,179,177,1341,180,176,26,170,168,165, %U A382178 1320,168,1277,1251,162,159,5,1649,204,1598,1579,1551,200,197,195 %N A382178 a(n) is the least k > 1 such that the factorial base expansion of k*n starts with that of n. %C A382178 This sequence is well defined (see A382177). %H A382178 Rémy Sigrist, <a href="/A382178/b382178.txt">Table of n, a(n) for n = 0..10000</a> %H A382178 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a> %F A382178 a(n) <= A382177(n). %e A382178 The first terms, in decimal and in factorial base, are: %e A382178 n a(n) fact(n) fact(a(n)*n) %e A382178 -- ---- ------- ------------ %e A382178 0 2 0 0 %e A382178 1 2 1 1,0 %e A382178 2 3 1,0 1,0,0 %e A382178 3 3 1,1 1,1,1 %e A382178 4 3 2,0 2,0,0 %e A382178 5 3 2,1 2,1,1 %e A382178 6 4 1,0,0 1,0,0,0 %e A382178 7 18 1,0,1 1,0,1,0,0 %e A382178 8 18 1,1,0 1,1,0,0,0 %e A382178 9 17 1,1,1 1,1,1,1,1 %e A382178 10 17 1,2,0 1,2,0,1,0 %e A382178 11 16 1,2,1 1,2,1,1,0 %e A382178 12 4 2,0,0 2,0,0,0 %e A382178 13 19 2,0,1 2,0,1,0,1 %e A382178 14 19 2,1,0 2,1,0,1,0 %e A382178 15 18 2,1,1 2,1,1,0,0 %o A382178 (PARI) A153880(n) = { my (v = 0, f = 1); for (r = 2, oo, if (n==0, return (v);); v += (n%r) * f *= r; n \= r;); } %o A382178 a(n) = { if (n==0, return (2)); my (m = n, f = 1, e); for (r = 2, oo, m = A153880(m); f *= r; e = (-m) % n; if (e < f, return ((m+e)/n););); } %Y A382178 Cf. A153880, A382177. %K A382178 nonn,base %O A382178 0,1 %A A382178 _Rémy Sigrist_, Mar 17 2025