To the younger one, emphasize that his brother having time alone with his friends doesn't mean that his brother doesn't love him and enjoy playing with him at other times. Being temporarily out of the scene doesn't mean you are permanently unwanted. Involve the boys in finding a solution to a problem of contradictory but legitimate needs.
Some possible solutions are:
1. Work hard to have the younger son invite friends over, especially at the same time as his older brother.
2. Protect your older son's privacy and need for a separate life.
3. Divide the time when the elder's friends are over so that some of the time the activities include the younger brother.
4. When your older son is occupied, take advantage of the time to do some quality activity with the younger son - even a household chore like cooking - and then you can both benefit.
I highly recommend the book Siblings Without Rivalry by Adele Faber and Elaine Mazlish.