This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A243840 #20 Mar 23 2024 17:30:24 %S A243840 0,0,0,0,1,1,1,1,0,1,1,2,2,1,1,1,2,1,1,1,1,1,0,1,1,2,2,2,1,2,2,1,1,1, %T A243840 2,1,1,1,2,2,3,2,1,2,2,2,1,2,2,2,1,2,2,2,1,2,2,1,1,1,2,2,3,2,2,2,3,2, %U A243840 2,2,3,2,1,2,2,2,1,2,2,2 %N A243840 Pair deficit of the most nearly equal in size partition of n into two parts using floor rounding of the expectations for n, floor(n/2) and n- floor(n/2), assuming equal likelihood of states defined by the number of two-cycles. %F A243840 a(n) = floor(A162970(n)/A000085(n)) - floor(A162970(floor(n/2))/A000085(floor(n/2))) - floor(A162970(n-floor(n/2))/A000085(n-floor(n/2))). %e A243840 Trivially, for n = 0,1 no pairs are possible so a(0) and a(1) are 0. %e A243840 For n = 2, the expectation, E(n), equals 0.5. So a(2) = floor(E(2)) - floor(E(1)) - floor(E(1)) = 0. %e A243840 For n = 5 = 2 + 3, E(5) = 20/13, E(2) = 0.5 and E(3) = 0.75 and a(5) = floor(E(5)) - floor(E(2)) - floor(E(3)) = 1. %e A243840 Interestingly, for n = 8, E(8) = 532/191 and E(4) = 6/5, so a(n) = 2 - 1 - 1 = 0. %Y A243840 A162970 provides the numerator for calculating the expected value. %Y A243840 A000085 provides the denominator for calculating the expected value. %K A243840 nonn %O A243840 0,12 %A A243840 _Rajan Murthy_, Jun 12 2014