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 A377387 #10 Apr 10 2025 08:19:36 %S A377387 1,3,8,27,135,1215,15795,328050,4920750,127764000,5826168000, %T A377387 126097171200 %N A377387 a(n) is the least number k such that A377384(k) = n, or -1 if no such number exists. %C A377387 a(12) > 2.2*10^12, if it exists. %C A377387 a(12) <= 5160284236800, a(13) <= 227052506419200. - _David A. Corneth_, Oct 27 2024 %C A377387 All the terms except for 3 are factorial-base Niven numbers (A118363). %e A377387 n | The n iterations %e A377387 --+------------------------------------------------------ %e A377387 1 | 3 -> 3/2 %e A377387 2 | 8 -> 4 -> 2 = 2! %e A377387 3 | 27 -> 9 -> 3 -> 3/2 %e A377387 4 | 135 -> 27 -> 9 -> 3 -> 3/2 %e A377387 5 | 1215 -> 135 -> 27 -> 9 -> 3 -> 3/2 %e A377387 6 | 15795 -> 1215 -> 135 -> 27 -> 9 -> 3 -> 3/2 %e A377387 7 | 328050 -> 18225 -> 1215 -> 135 -> 27 -> 9 -> 3 -> 3/2 %t A377387 fdigsum[n_] := Module[{k = n, m = 2, r, s = 0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, s += r; m++]; s]; f[n_] := f[n] = Module[{s = fdigsum[n]}, If[s == 1, 0, If[!Divisible[n, s], 1, 1 + f[n/s]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 1, i}, While[c < len, i = f[k] + 1; If[v[[i]] == 0, c++; v[[i]] = k]; k++]; v]; seq[8] %o A377387 (PARI) fdigsum(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); s;} %o A377387 f(n) = {my(s = fdigsum(n)); if(s == 1, 0, if(n % s, 1, 1 + f(n/s)));} %o A377387 lista(len) = {my(v = vector(len), c = 0, k = 1, i); while(c < len, i = f(k) + 1; if(v[i] == 0, c++; v[i] = k); k++); v; } %Y A377387 Cf. A118363, A377384. %Y A377387 Analogous sequences: A376619 (binary), A377211 (Zeckendorf). %K A377387 nonn,base,more %O A377387 0,2 %A A377387 _Amiram Eldar_, Oct 27 2024