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-2 of 2 results.

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

Original entry on oeis.org

3, 2, 3, 2, 2, 3, 3, 2, 2, 4, 2, 4, 2, 4, 2, 2, 3, 3, 2, 2, 2, 2, 5, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 4, 3, 3, 3, 2, 3, 2, 4, 3, 3, 2, 3, 2, 2, 2, 3, 2, 4, 2, 3, 3, 3, 2, 4, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2, 4, 2, 4
Offset: 1

Views

Author

Clark Kimberling, Mar 09 2025

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    f[h_, m_] := Sum[Floor[h/m^k], {k, 0, Floor[Log[m, h]]}]
    {rng, n} = {1000, 6};
    Table[u[m] = Select[Range[rng], PrimeQ[f[#, m]] &], {m, 2, n}];
    tmp = SortBy[Map[#[[1]] &, GatherBy[Flatten[Table[
           Transpose[{ConstantArray[m, Length[u[m]]],
             Map[PrimePi[f[#, m]] &, u[m]]}], {m, 2, n}],1], #[[2]] &]], #[[2]] &];
    tmp = Map[#[[1]] &, Take[tmp, Position[Differences[Map[#[[2]] &, tmp]], x_ /; x != 1, 1, 1][[1]][[1]]]]
    (* Peter J. C. Moses, Feb 19 2025 *)

Formula

a(n) = A382278(prime(n)). - Pontus von Brömssen, Mar 22 2025

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 *)
Showing 1-2 of 2 results.