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 A382278 #15 Mar 31 2025 21:21:04 %S A382278 2,3,2,2,3,3,2,2,3,2,2,4,3,3,2,2,3,2,2,5,3,2,2,4,2,2,3,3,4,3,2,2,4,2, %T A382278 2,3,4,2,2,3,2,2,4,3,3,2,2,3,2,2,5,4,2,2,3,2,2,3,3,4,3,3,2,2,4,2,2,3, %U A382278 4,2,2,3,2,2,3,3,5,2,2,3,2,2,5,3,2,2 %N A382278 a(n) = least integer m >= 2 such that n is a sum of the form Sum_{k>=0} floor(h/m^k) for some integer h >= 1. %C A382278 Let R denote the rectangular array in which row n gives the positions of n+1 in the sequence. Corner of R: %C A382278 1 3 4 7 8 10 11 15 %C A382278 2 5 6 9 13 14 17 21 %C A382278 12 24 29 33 37 43 52 60 %C A382278 20 51 77 83 226 253 275 306 %C A382278 141 254 285 403 510 541 572 765 %C A382278 (row 1 of R) = A005187(n) for n >= 1. %e A382278 a(12) = 4, because 4 is the least m such that 12 is a sum of the form Sum_{k>=0} floor(h/4^k) for some h >= 1; that sum is [10/1] + [10/4], where [ ] = floor. %t A382278 testM[n_, m_] := With[{hMin = Floor[(n (m - 1) + m)/m], hMax = 2 n m}, %t A382278 AnyTrue[Range[hMin, hMax], Total[IntegerDigits[#, m]] == m # - n (m - 1) &]]; %t A382278 a[n_] := SelectFirst[Range[2, n + 1], testM[n, #] &] %t A382278 t = Map[a, Range[100]] %t A382278 (* _Peter J. C. Moses_, Mar 20 2025 *) %Y A382278 Cf. A005187, A381897, A382324. %K A382278 nonn %O A382278 1,1 %A A382278 _Clark Kimberling_, Mar 21 2025