How many ways are there to pick r objects from n objects when repetitions are allowed and either both the first and the second objects appear exactly once or both do not appear?
So here is what I tried and I'm not sure if it's correct.
If we have n bins and each bin is an object, and we choose each object once we will have r-n, but since the first and second object appear once or not at all we have r-(n-2)+-2, at least I think. So using
$n+k-1 \choose k$
I think I can get
$n+(r-(n-2)\pm2)-1 \choose k$
Is this correct? I dont think it is, but I'm not sure how else to go about this.