Mr Davis 97
- 1,461
- 44
This is a simple computational question. Let ##n \in [0, 36)##. What's the fastest way to list all ##n## s.t ##36## divides ##48n##?
The discussion focuses on identifying integers n within the range [0, 36) such that 36 divides 48n. The key insight is that n must provide the necessary factors for 48n to include the prime factorization of 36, which is 2² * 3². The participants suggest that a more precise notation for n would be to define it as n ∈ {0, 1, 2, ..., 35}. The fastest algorithm to enumerate valid n values is derived from understanding these factor requirements.
PREREQUISITESMathematicians, computer scientists, and students interested in number theory and algorithm optimization will benefit from this discussion.
This notation is a bit odd, as it implies that n belongs to the real interval. A better way to write it IMO would beMr Davis 97 said:Let n∈[0,36)
I would probably do this first, rather than as an alternate approach.jedishrfu said:Alternatively, you can look at what n should be such that 48*n contains the factors of 36 namely 2*2*3*3.