strange probability from pbinom() in R R is giving me a strange probability for the input

pbinom(n, 100, prob)

Any n over 100 seems to cause it to default to 1.
What should I do when my n is greater than 100?
 A: This is a problem common to all statistical platforms: there is a myriad of functions related to distributions; many require several parameters; and it's hard to keep them all straight!
It used to be you had to use tabulated values.  The better tables provided clear descriptions of the parameters on every page.  Moreover, you could scan down the values and make a good guess as to what was varying as you moved across or down each page.  Guess what?  You can ask the computer to do this for you.
Details vary from platform to platform, but the technique doesn't: graph a range of values you think might be reasonable inputs.  Inspect the graph to check they are behaving as you expect.
In R we can obtain values for multiple inputs of n by supplying a vector.  Well, evidently n is integral and won't be negative and we're interested in values above $100$, too.  So let's plot pbinom(n, 100, prob) for a "nice" value of prob (how about $1/2$ to start?) for n = 0, 1, 2, ..., 100, 101, and maybe even a few more values:
> plot(pbinom(0:105, 100, 1/2), xlab="n")


This looks a lot like a cumulative distribution function (CDF): it rises from $0$ at the left to $1$ at the right.  Most of the rise is near $50$, which at $100 \times 1/2$ is smack at the expected value of a binomial distribution for $100$ trials and probability $1/2$.  We can confirm this by modifying the 1/2 in the R code and watching how it influences where the CDF rises.
sapply(c(1/2, 1/3, 1/4, 1/6), function(p) 
  curve(pbinom(x, 100, p), from=0, to=100, add=p!=1/2, lwd=2, col=hsv(2*p,1,1)))


Our conclusion, quickly reached, is that the first parameter of pbinom must be the number of "successes,", the second parameter is the number of trials, and the third parameter is the chance of success (not of failure).  It looks like pbinom(n,m,p) is returning $\Pr(X\le n)$ when $X$ has a Binomial$(m,p)$ distribution.  Just as a check that $\le$ is meant instead of $\lt$, compute some small values:
> pbinom(0:2, 2, 1/2)
[1] 0.25 0.75 1.00

Yes, that's what we should see with the "$\le$" interpretation, as we can easily calculate by hand.
You get the idea: whenever possible, make a quick plot of the functions you are using so that you can be sure you are using them correctly.  In addition, inspect a few values for simple arguments to make sure you're using them properly.  The habit of routinely checking your understanding of the software translates to more correct answers, less debugging, and less apologizing for the mistakes that will inevitably occur in any numerical work.
A: It's supposed to be:

pbinom(k,n,prob)

