Problem: x is a positive integer less than 300 . when x is divided by 7 , the remainder is 1 ; when x is divided by 3 , the remainder is 2 . how many x are there ?
Rationale: "the nubmer which when divided by 7 leaves remainder 1 should be of the form 7 k + 1 this number when divided by 3 leaves remainder 2 . so , ( 7 k + 1 ) - 2 should be divisible by 3 or 7 k - 1 should be divisible by 3 . we now put the values of k starting from 0 to find first number divisible by 3 we find 1 st number at k = 1 thus smallest number will be 7 ( 1 ) + 1 = 8 now , next number will be = 8 + lcm of 37 i . e 29 now we will find number of all such values less than 500 by using the formula for last term of an a . p 8 + ( n - 1 ) 21 = 300 n = 22.13 or n = 22 answer : - b"
annotated_formula: subtract(add(multiply(reminder(7, 300), 3), reminder(3, 300)), reminder(1, 300))