I would think the easiest way to figure out the answer is just to look at multiples of 7, till you get to one where the product of the digits is 36. So....7x1=7. 7x2=14, but 1x4 does not equal 36. 7x3=21...nope. 7x4=28. 7x5=35 7x6=42 7x7=49 Aha! 4x9 does indeed = 36, so 49 would be the solution. I'm not sure how you would go about writing a formula. There doesn't seem to me to be any logical way to do that, because you are talking about two different systems.
Let the number be ab such tha:
a*b = 36
Then ab coud be :
9*4, 4*9 , 6*6 ,
Then the number could be:
94, 49, or 66
but ab is divisible by 7;
97 and 66 are not divisible by 7.
Then the answer is 49.
Let us check:
the product of the digits = 4*9 = 36 check.
The number is divisible by 7 ==> 49/7 = 7 check.
What do you mean by formula? The probelm asked you to write a formula for this?