User blog comment:Wythagoras/Friendship function/@comment-1605058-20140717204945/@comment-10429372-20140718125850

Yes. That's beacause (p,p) (q,p) and (q,p) are redundant, they are inside (q,p,p).