It varies from airline to airline and there is generally some method in the madness
For Air India
Three digit flight nos starting with 1 were to Euope/US
Starting with 2 to Africa
3 to Far East (Japan/Thailand/Hong Kong)
4 to Singapore/Malaysia
6 for purely domestic hops
7/8/9 for the middle east sectors
Thus we find AI 101 is to LHR and JFK, AI 145 to CDG and EWR while the new LAX route which is starting next month gets AI 137.
Similary AI 201 is to NBO, AI 314 is to HKG and KIX while 472 gets you to Jakarta via SIN.
All Air India code shares have four digit numbers.
Similary for Indian domestic operator Sahara who have a 737/CRJ fleet
All the 737s have three digit flight numbers while their CRJ flight nos have four digits.
Indian Airlines who uses the aircraft of subsidiary alliance air as well, uses the same technique
All flights operated by Indian AIrlines aircraft have three digits while alliance air aircraft have four digit flight numbers starting with 7.
A classic case is the flight from Madras to Port Blair operated till recently by alliance air 737 whereby the flight no was IC 7549. Recently Indian Airlines replaced the equipment with their own A320s where by the flight number changed to IC549.