n = 40 (slider from 1 to 50, step 1)
p = 0.6 (slider from 0 to 1, step 0.01)
f(x) = ((n! / ((x! * (n - x)!)) * p^(x)) * (1 - p)^(n - x))
g(x) = f(floor(x + 0.5))
o = UpperSum(g, -0.5, n + 0.5, n + 1)
b = 28 (slider from 0 to 50, step 1)
h(x) = ((n! / ((x! * (n - x)!)) * p^(x)) * (1 - p)^(n - x))
i(x) = h(floor(x + 0.5))
c = UpperSum(i, -0.5, n + 0.5, n + 1)
w = UpperSum(g, b - 0.5, n - 0.5, n - b)
d = UpperSum(g, -0.5, n - 0.5, n)

Tool: Bin
Input: k, p, n
Output: a

a: ((n! / ((k! * (n - k)!)) * p^(k)) * (1 - p)^(n - k))