when positive integer n is divided by 5 , the remainder is 1 . when n is divided by 7 , the remainder is 5 . what is the smallest positive integer p , such that ( n + p ) is a multiple of 30 ?
"when positive integer n is divided by 5 , the remainder is 1 i . e . , n = 5 x + 1 values of n can be one of { 1 , 6 , 11 , 16 , 21 , 26 , 31 . . . . . . . . . . . . . 46 , 51 , 56,61 . . . . . . . . . . . . . . . . . . } similarly , when n is divided by 7 , the remainder is 5 . . i . e . , n = 7 y + 5 values of n can be one of { 5 , 12 , 19 , 26 , 33 , 40 , 47 , 54 , 61 . . . . . . . . } combining both the sets we get n = { 19 , 52 , . . . . . . . . . . . } what is the smallest positive integer p , such that ( n + p ) is a multiple of 30 or 30 x in case of n = 26 p = 4 c is the answer ."
subtract(30, reminder(5, 7))