%I #21 Mar 23 2024 17:30:53
%S 0,0,1,0,0,0,0,0,-1,0,0,1,1,0,0,0,1,0,0,0,0,0,-1,0,0,1,1,1,0,1,1,0,0,
%T 0,1,0,0,0,1,1,2,1,0,1,1,1,0,1,1,1,0,1,1,1
%N Pair deficit of the most nearly equal partition of n into two parts using ceiling rounding of the expectations of n, floor(n/2) and n-floor(n/2), assuming equal likelihood of states defined by the number of 2-cycles.
%C A162970 and A000085 provide the numerator and the denominator for calculating the expected value.
%F a(n) = ceiling(A162970(n)/A000085(n)) - (ceiling(A162970(floor(n/2))/A000085(floor(n/2))) + ceiling(A162970(n-floor(n/2))/A000085(n-floor(n/2)))).
%e Trivially, for n = 0,1 no pairs are possible so a(0) and a(1) are 0.
%e For n = 2, the expectation, E(n), equals 0.5. So a(2) = ceiling(E(2)) - (ceiling(E(1)) + ceiling(E(1))) = 1.
%e For n = 5 = 2 + 3, E(5) = 20/13, E(2) = 0.5 and E(3) = 0.75 and a(5) = ceiling(E(5)) - (ceiling(E(2)) + ceiling(E(3))) = 0.
%e Interestingly, for n = 8, E(8) = 532/191 and E(4) = 6/5, so a(n) = 3 - (2 + 2) = -1.
%Y Cf. A000085, A162970.
%K sign,more
%O 0,41
%A _Rajan Murthy_, Jun 12 2014