If I understand it correctly, this is what you mean:
A is a high card for A2, A3, A4, A5, A6, A7, A8, A9, AT, AJ, AQ, AK and AA. That is 12 unpaired hands and 1 paired hand.
K is a high card for K2-KQ and KK. 11 unpaired hands and 1 paired hand.
So, the way to calculate this is 1/1326* ( 14*(12*16 +6) + 13*(11*16+6) + ... )
In general I think it would be like this
http://www.wolframalpha.com/input/?i...)+),+i%3D0..12