Out on my street, there are a certain number of pigeons sitting on telephone poles. If there were exactly 2 pigeons sitting on each telephone pole, then 1 pigeon would have no space to sit on. If there were exactly 3 pigeons sitting on each telephone pole, then there would be 1 telephone pole with no pigeons on. How many pigeons were there?

If there are n poles,

2n+1 = 3(n-1)
n=4

so, 4 poles, 9 birds