calculate PIM lookups based on ODHMSAS algo