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.

A382324 a(n) = least integer h >= 1 such that n is a sum of the form Sum_{k>=0} floor(h/m^k) for some integer m >= 2.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 4, 5, 7, 6, 7, 10, 9, 10, 8, 9, 12, 10, 11, 17, 15, 12, 13, 19, 14, 15, 19, 20, 23, 21, 16, 17, 26, 18, 19, 26, 29, 20, 21, 27, 22, 23, 33, 30, 31, 24, 25, 33, 26, 27, 42, 40, 28, 29, 38, 30, 31, 40, 41, 47, 42, 43, 32, 33, 50, 34, 35, 47
Offset: 1

Views

Author

Clark Kimberling, Apr 01 2025

Keywords

Examples

			a(12) = 10, because 10 is the least h such that 12 is a sum of the form Sum_{k>=0} floor(h/m^k) for some m >= 2; that sum is [10/1] + [10/4], where [ ] = floor.
		

Crossrefs

Cf. A382278.

Programs

  • Mathematica
    findH[n_, m_] := With[{hMin = Floor[(n*(m - 1) + m)/m], hMax = 2*n*m},
       SelectFirst[Range[hMin, hMax], Total[IntegerDigits[#1, m]] == m*#1 - n*(m - 1) &, None]];
    aPair[n_] := With[{m = SelectFirst[Range[2, n + 1], findH[n, #1] =!= None &, None]},
    If[m === None, None, {m, findH[n, m]}]];
    t = ({#1, aPair[#1]} &) /@ Range[100]
    Map[Last, Map[Last, t]]
    (* Peter J. C. Moses, Mar 20 2025 *)