OFFSET
0,1
COMMENTS
According to Bayon et al, the probability P(n,r) = 2*r*((r/n-1)+sum_{i=r..n-1} 1/i)/n of success in a generalized Secretary problem for a given number n of applicants has a maximum at some value of r, 1<=r<n. These best values are r=1 for n<=8, r=2 for n<=13, r=3 for n<=18 and so on.
The Beatty sequence of A106533, b(n) = floor(n*A106533), is a good approximation to r for large n. So the indices n-1 of the steps where b(n) = b(n+1)-1 are an approximation to this sequence.
We added numbers 27, 86 and 91 that are apparently missing in the preprint. R. J. Mathar, Feb 22 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..202
L. Bayon, J. Grau, A. M. Oller-Marcen, M. Ruiz, P. M. Suarez, A variant of the Secretary Problem: the Best or the Worst, arXiv preprint arXiv:1603.03928 [math.PR], 2016.
MAPLE
P := proc(n,
option remember;
local i;
2*r/n*((r/n-1)+add(1/i, i=r..n-1)) ;
end proc:
Pmax := proc(n)
option remember;
local r;
for r from 1 to n-1 do
if P(n, r+1) < P(n, r) then
return r ;
end if;
end do:
end proc:
A282025 := proc(r)
local n ;
if r = 0 then
return 3;
end if;
for n from r+1 do
if Pmax(n+1) = r+1 then
return n;
end if;
end do:
return -1 ;
end proc:
seq(A282025(r), r=0..80) ; # R. J. Mathar, Feb 22 2017
MATHEMATICA
P[n_, r_] := 2 r ((r/n - 1) + Sum[ 1/i, {i, r, n - 1}])/n; Function[s, {3}~Join~Map[-1 + Position[s, #][[1, 1]] &, Range@ Max@ s]]@ Map[Length@ TakeWhile[#, # == 0 &] &, Table[If[P[n, k + 1] < P[n, k], k, 0], {n, 300}, {k, n - 1}]] (* Michael De Vlieger, Feb 22 2017, after Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 11 2017
STATUS
approved