OFFSET
1,2
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.15, p. 362.
LINKS
Steven Finch, A Deceptively Simple Quadratic Recurrence, arXiv:2409.03510 [math.NT], 2024.
Jon E. Schoenfield, Magma program communicated to J.-F. Alcover.
Eric Weisstein's MathWorld, Sultan's Dowry Problem.
Wikipedia, Secretary problem.
FORMULA
Q(0) = 0, Q(n) = (1/2)*(1+Q(n-1)^2), Q(n) ~ 1-2/(n+log(n)+b) when n -> infinity.
EXAMPLE
1.767993786136154050443634406781132331077681433131956515576986059626...
MATHEMATICA
nmax = 10^10; dn = 10^6; db = 2*10^-16; b0 = p = 3; q = 10/3; b = q - Log[2]; f = Compile[{n, p, q}, (p*((p-5)*p + 8) + n*(n*p + (2*p-5)*p + 2) + q - 5)/((p-5)*p + n*(n + 2*p - 5) + 7)]; For[n = 3, n <= nmax, n++, If[Divisible[n, dn], b0 = b]; r = f[n, p, q]; b = r - Log[n]; p = q; q = r; If[Divisible[n, dn], Print["n = ", n, " b = ", b]; If[Abs[b - b0] < db, Break[]]]]; RealDigits[b] // First
PROG
(Magma) // See the link to Jon E. Schoenfield's program.
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Jean-François Alcover, Aug 01 2014
EXTENSIONS
Extended to 99 digits using Jon E. Schoenfield's evaluation, Sep 05 2016
STATUS
approved