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.

This page as a plain text file.
%I A382324 #6 Apr 07 2025 17:52:50
%S A382324 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,
%T A382324 20,23,21,16,17,26,18,19,26,29,20,21,27,22,23,33,30,31,24,25,33,26,27,
%U A382324 42,40,28,29,38,30,31,40,41,47,42,43,32,33,50,34,35,47
%N 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.
%e A382324 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.
%t A382324 findH[n_, m_] := With[{hMin = Floor[(n*(m - 1) + m)/m], hMax = 2*n*m},
%t A382324    SelectFirst[Range[hMin, hMax], Total[IntegerDigits[#1, m]] == m*#1 - n*(m - 1) &, None]];
%t A382324 aPair[n_] := With[{m = SelectFirst[Range[2, n + 1], findH[n, #1] =!= None &, None]},
%t A382324 If[m === None, None, {m, findH[n, m]}]];
%t A382324 t = ({#1, aPair[#1]} &) /@ Range[100]
%t A382324 Map[Last, Map[Last, t]]
%t A382324 (* _Peter J. C. Moses_, Mar 20 2025 *)
%Y A382324 Cf. A382278.
%K A382324 nonn
%O A382324 1,2
%A A382324 _Clark Kimberling_, Apr 01 2025