OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
Eric Weisstein's World of Mathematics, Sultan's Dowry Problem.
Wikipedia, Secretary problem.
EXAMPLE
1, 1/2, 1/2, 11/24, 13/30, 77/180, 29/70, 459/1120, ...
MATHEMATICA
G[k_, n_] := G[k, n] = 1/( k + 1) Max[(k + 1)/n, G[k + 1, n]] + k/(k + 1)G[k + 1, n]; G[n_, n_] = 0; Denominator@Table[G[0, n], {n, 1, 20}]
PROG
(PARI) a(n)={my(g=0); forstep(k=n-1, 0, -1, g = max(1/n, g/(k+1)) + k*g/(k+1)); denominator(g)} \\ Andrew Howroyd, Nov 12 2018
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
José María Grau Ribas, Jun 01 2013
STATUS
approved