A pidgey provides 100 exp flat when you catch it, that's the base amount if we ignore good throws.
A pidgey contributes 4 candies to evolution (you sell it for 1 extra). An evolution of a pidgey costs 12 candies, but you get a bonus candy when you evolve it.
Thus, you actually need only 11 candies for evolving (in some hand-wavy argument). Each pidgey still provides 4 candies, so the experience gained per pidgey is:
500 / (11 / 4) = 182 exp
Combined with the 100 base exp, we're looking at a very good amount of experience of 282 exp. If you use lucky egg with pidgey, you end up with 464 experience.
Compare that with a ratata, which takes 25 candies to evolve. Each ratata would gain only 83 extra experience from evolving, and each ratata 183 exp. If you evolve ratatas with lucky eggs, you only get 266 experience. Compare 266 to the 464 exp gain of a pidgey, we see pidgey is far superior.
The formula for computing exp gain from evolution if a pokemon uses #candy to evolve
500 / ( (#candies - 1) / 4 )
The fact you can use the formula presented here is not entirely obvious, essentially it is only true when you catch a lot of pidgeys. Below is a link to a script I created, which would be helpful for you to see how many exp you can expect to get from catching a certain amount of pokemons (combined exp of catching and evolving, where evolving can be combined with lucky egg). Edit the caught list however you like, and hit run to get the results.
https://repl.it/Cc0d/0
How much exp is a magic carp?
caught = [(1, 400)]
it gives you only 105 experience, that's a mere 5 more over the base rate. I suppose the garydos is worth it though.
To manually derive the exp gain of a pidgey from evolving, we show it is possible to evolve 4 times with only 11 pidgeys. i.e. 2000 exp / 11 = 182 exp per pidgey
Consider the following scenario:
You just caught 11 pdigeys.
You go up to me, and say "hey Evan, I got 11 pidgeys here that I want to evolve, but I need some help. I need to borrow 4 pidgey candies"
And to which I reply "Sure thing. Make sure to give them back though"
As you can see, as long as you borrow the candies and gave them back to me, you can pretend the cost of evolving your pidgeys is entirely dependent on the pidgeys you caught, and not dependent on the candies I lend you nor anything else. The candies are just there to start the process.
Hope this helps! Happy farming.
But help! My pidgeys all have 300+ CP and I waste 6 balls trying to even get any! When farming exp through catching pidgeys become painful, you can consider farming pokestops if you live in a dense enough area. Consider these 2 previous blog posts:
http://www.liquiddota.com/blogs/511601-pokemon-go-alternative-high-level-exp-farming
http://www.liquiddota.com/blogs/511646-pokemon-go-lure-farming-vs-pokestop-farming
Cheers!
--evan
p.s.
again, if you like this post, subscribe to my youtube channel and take a look at my totally unrelated cooking videos:
https://www.youtube.com/channel/UCSspGV5tkNJ9q_ZCboYzTcQ
and take a trip to the grocery while catching the pidgeys! :D