Enumerating integers n s.t. 36 | 48n

  • Context: Undergrad 
  • Thread starter Thread starter Mr Davis 97
  • Start date Start date
  • Tags Tags
    Integers
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 1K views
Mr Davis 97
Messages
1,461
Reaction score
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##?
 
Mathematics news on Phys.org
Well first I would get a list of numbers for n where it is true and from there deduce the fastest algorithm to list them.

Alternatively, you can look at what n should be such that 48*n contains the factors of 36 namely 2*2*3*3.

so what must n provide so that the product contains the factors of 36?
 
Mr Davis 97 said:
Let n∈[0,36)
This notation is a bit odd, as it implies that n belongs to the real interval. A better way to write it IMO would be
##\text{Let } n \in \{0, 1, 2, \dots, 35\}##

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.
I would probably do this first, rather than as an alternate approach.
 
  • Like
Likes   Reactions: jedishrfu