%I
%S 1,1,2,2,4,8,16,28,50,92,170,314,584,1092,2048,3854,7280,13796,26214,
%T 49932,95324,182360,349524,671088,1290554,2485512,4793490,9256394
%N RenyiUlam liar numbers: for k=1,2,3,... this is the maximum n such that k questions "Is x in subset S of {1,...,n}?" are guaranteed to determine x when at most one answer can be a lie.
%C Calculated from Andrzej Pelc's complete solution for 1liar games which gives the minimum number of questions required for a given set {1,...,n}.
%C Andrzej Pelc's formula for the minimum number of questions required for a given set {1,...,n} is: the least value of q such that f(q)>=n, where f(q)=2^q/(q+1) for even n, and f(q)=(2^qq+1)/(q+1) for odd n. We use this to generate the sequence of maximum set sizes for each value of q.
%H D. Osthus and R. Watkinson, <a href="http://dx.doi.org/10.4171/EM/92">A simple solution to Ulam's liar game with one lie</a>, Elemente der Mathematik 63 (2008), 97101.
%H A. Pelc, <a href="https://doi.org/10.1016/00973165(87)900653">Solution of Ulamâ€™s Problem on searching with a lie</a>, J. Combinatorial Theory, Series A, vol. 44 (1987), 129140.
%e a(1) = 1 since 1 question is (vacuously) sufficient to determine x in {1}; a(2) = 1, since 2 questions (with one possible lie) is no better than 1; a(3) >= 2, since we can determine x in {1,2} by asking "Is x in {1}?" three times and majority voting. But a(3) is not >2 because we need 5 questions for {1,2,3}; which implies a(4) = 2 also.
%p LiarSequence:=proc(n)
%p local q,L,k;
%p q:=1: L:=NULL;
%p for k from 1 to n do
%p while 2^q/(q+1)(k+1 mod 2)*(q1)/(q+1)<k+1 do q:=q+1; L:=L,k end:
%p end: L end:
%K nonn
%O 1,3
%A _Robin W. Whitty_, Jun 15 2017
