I have always used your lvl divided by 2, plus 1, then add your lvl. So a lvl 50 should be able to group with a ........50/2 = 25 +1 = 26+50(your lvl) = 76 highest lvl person you can group with. I found this years ago so it may not be completly true, but it hasn't failed me yet.
Hehe as shang said, you can group with any level player. You can only get exp with a person that is 1.5 your level + 1. (unless that number is greater than 30... you can never get exp with more than 30 levels difference.) (As Noirfu said above).
Using +1 in any forumla for this is a mistake as it results in the wrong answer at least 1/3 of the time. Standard Methods: The most accurate way is to take 2/3 of the higher level person's level and round appropriately. This also can determine your personal lower limit. The less accurate way is to take 1.5 (3/2) times the lower level person's level and round up when not a whole number. This also can determin your personal upper limit. Special rules If you are 1-10 then you have a hardcoded +/- 5 level range. If you are 11-14 then you have have a hardcoded 5 level lower limit; while the upper limit uses the standard method. If you're 60 or higher just add 30 to your level for the upper limit. If you are 90 or higher you have a +/- 30 level range.