Question
Let S =\ ( m , n ): m , n \ 1,2,3, .., 50\ \ . If the number of elements ( m , n ) in S such that 6^ m +9^ n is a multiple of 5 is p and the number of elements (m, n) in S such that m+n is a square of a prime number is q, then p + q is equal to \_\_\_\_.
Step-by-step solution
For 6^m + 9^n 0 5 : 6 1 5 and 9 -1 5 So 6^m + 9^n 1 + (-1)^n 5 This equals 0 only when n is odd. Number of odd n in 1,...,50 = 25, and m can be any of 50 values. p = 50 25 = 1250 For m + n = square of prime, possible values are 4, 9, 25, 49. m + n = 4: 3 pairs m + n = 9: 8 pairs m + n = 25: 24 pairs m + n = 49: 48 pairs q = 3 + 8 + 24 + 48 = 83 p + q = 1250 + 83 = 1333