N is a tridecimal (base 13) positive integer using the digits 1 to 5 at least once, but at most twice. All the digits of N are nonzero and none of the digits from 6 to C occur in N.

Determine the probability that N is divisible by the tridecimal number 22.

I am using a notation a_b to denote the number a in base b. Base 13 also has digits A,B,and C.

For N to be a multiple of 11_13 the sum of the odd digits must differ from the sum of the even digits by a multiple of 11_13. With only two if each digit 1 to 5 the largest difference is (5+5+4+4+3)-(3+2+2+1+1) = C_13; this is less than the base therefore N must have the sum odd digits equal to the sum of the even digits.

22_13 is a multiple of 4. This means that the sum of the all the digits of N must also be a multiple of 4 (similar to multiples of 3 in base 10).

The only five digit set {1,2,3,4,5} does not work.

Two six digit sets do work: {1,1,2,3,4,5} split into {1,2,5}+{1,3,4} and {1,2,3,4,5,5} split into {1,4,5}+{2,3,5}.

Seven digit sets that work {1,1,2,3,4,4,5}, {1,2,2,3,3,4,5}, {1,2,3,4,4,5,5}. Each with multiple ways to split each set.

Eight digit sets that work include {2,2,3,3,4,4,5,5}, {1,2,2,3,3,4,4,5}, {1,1,2,3,3,4,5,5}, {1,1,2,2,4,4,5,5}, and {1,1,2,2,3,3,4,4}. Each with multiple ways to split each set.

Only one nine digit set works {1,1,2,3,3,4,4,5,5}, with multiple ways to split the set.

The only ten digit set {1,1,2,2,3,3,4,4,5,5} does not work.