OFFSET
1,2
COMMENTS
a(1)=1. For a given n>=2, let M be the largest of the numbers in the finite sequence [m/(largest prime dividing m), m=2,3,...,n]. a(n) is defined to be the largest m in (2,3,...,n) for which M is attained. Example: a(14)=12 because the values of m/(largest prime dividing m) for m = 2,3,...,14 are 1,1,2,1,2,1,4,3,2,1,4,1,2. The largest of these is 4 and it is attained for m=8 and m=12; the largest of these is 12.
LINKS
Gary Gordon, The Number between 1 and n That Is Least Prime: Problem 11218, Amer. Math. Monthly, 115 (No. 4, 2008), pp. 367-368.
EXAMPLE
For n=10 we get the ordering 1/ 2, 3, 5, 7/ 4, 6, 10/ 9/ 8 (the rounds are separated by /); so a(10)=8.
MAPLE
with(numtheory): b:=proc(m) local u: if m=1 then 1 else u:=factorset(m): m/max(seq(u[j], j=1..nops(u))) end if end proc: a:=proc(n) local M, i, a: M:=max(seq(b(j), j=1..n)): for i to n do if b(i)=M then a[i]:=i else a[i]:=0 end if end do: max(seq(a[i], i=1..n)) end proc: seq(a(n), n=1..80);
MATHEMATICA
b[m_] := If[m == 1, 1, m/Max[FactorInteger[m][[All, 1]]]];
a[n_] := Module[{M, i, a}, M = Max[Table[b[j], {j, 1, n}]]; For[i = 1, i <= n, i++, If[b[i] == M, a[i] = i, a[i] = 0]]; Max[Table[a[i], {i, 1, n}]]];
Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Sep 05 2024, after Maple program *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch and Gary Gordon, Apr 01 2008
STATUS
approved