cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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, 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, 4, 2, 2, 3, 2, 2, 3, 3, 5, 2, 2, 3, 2, 2, 5, 3, 2, 2
Offset: 1

Views

Author

Clark Kimberling, Mar 21 2025

Keywords

Comments

Let R denote the rectangular array in which row n gives the positions of n+1 in the sequence. Corner of R:
1 3 4 7 8 10 11 15
2 5 6 9 13 14 17 21
12 24 29 33 37 43 52 60
20 51 77 83 226 253 275 306
141 254 285 403 510 541 572 765
(row 1 of R) = A005187(n) for n >= 1.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    testM[n_, m_] := With[{hMin = Floor[(n (m - 1) + m)/m], hMax = 2 n m},
       AnyTrue[Range[hMin, hMax], Total[IntegerDigits[#, m]] == m # - n (m - 1) &]];
    a[n_] := SelectFirst[Range[2, n + 1], testM[n, #] &]
    t = Map[a, Range[100]]
    (* Peter J. C. Moses, Mar 20 2025 *)
Showing 1-1 of 1 results.