Let N be a 5-digit palindrome. The probability that N is divisible by 4 can be expressed as \frac{a}{b}, where a and b are coprime positive integers. What is the value of a+b?

There are 900 5-digit palindromes, from 10001, 10101 , 10201, 10301, ... to 99899, 99999.

Out of these 900 palindromes, divisibility is determined by the last four digits, namely 00, 01, 02, ...99.
The probability of divisibility by 4 for digits of 00 to 99 is 1/4.

So a=1, b=4. What is a+b?

I calculated it and a got a totally different answer

What is your answer?

Did you use the sine law?

I think I did use the sine law but I am just not sure how to get a+b?

What is the probability, i.e. a and b?

I am curious how you find the probability of divisibility of palindromes by 4 using the sine law. Can you kindly show your work?

Suppose N = xyzyx, where x is nonzero but y and z could be any digit.

Then there are 9(10^2) = 900 possible palindromes to consider.

Recall that a number is divisible by 4 iff its last two digits are divisible by 4. Thus, if N is divisible by 4, then "yx" must be of the form "04", "08", "12", "16", ..., "92", "96", except it cannot end in a 0 (so we must omit "20", "40", "60", and "80"). Hence, there are (96/4 - 4) = 20 possible values of "yx". Since z is unrestricted, we multiply by 10 to yield 200 palindromes that satisfy this criteria.

Thus, P(N is divisible by 4) = 200/900 = 2/9.
Since a = 2 and b = 9, we have a+b = 11.