Coloring each k-th unit in a circle of n units

AI Thread Summary
The discussion centers on a mathematical problem involving coloring numbers arranged in a circle based on a step size k. When the greatest common divisor (gcd) of n (the total numbers) and k is 1, all numbers in the circle are colored. If k divides n, the number of colored units x equals n/k. For cases where gcd(n, k) is greater than 1, such as n=10 and k=8, the number of colored units can be determined by dividing n by gcd(n, k). In this example, gcd(10, 8) is 2, leading to x being 10 divided by 2, resulting in 5 colored numbers. The discussion highlights the importance of understanding the relationship between n, k, and their gcd to determine the number of colored units effectively.
yetam60389
Messages
2
Reaction score
0
TL;DR Summary
N numbers in a circle, coloring each k-th one.
suppose you write, clockwise, n numbers (or "units", doesn't matter) in a circle. you then color, clockwise, each k-th number. you do this until you've colored all n numbers, or until you've reached an already colored number. let x be the number of colored numbers.
i've figured that if gcd(n,k)=1, if they're coprime, the whole circle is colored.
furthermore, if k divides n, then x=n/k.

n=10, k=7, then x=10

n=10, k=5, then x=2

tho, what if they're not?
n=10, k=8, then x=5. from where does this 5 arise?

i swear I've solved this before but i just can't find the answer within my brain now.

thanks for any help!
 
Technology news on Phys.org
yetam60389 said:
n=10, k=8, then x=5. from where does this 5 arise?
What is 10 divided by gcd(10, 8)?

You just need to generalize your analysis a bit.
 
PeterDonis said:
What is 10 divided by gcd(10, 8)?

You just need to generalize your analysis a bit.
figured it out in the meanwhile. you're right, i was quite slow in figuring that out.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
27
Views
5K
3
Replies
100
Views
11K
Replies
25
Views
4K
2
Replies
60
Views
11K
Replies
51
Views
10K
Replies
3
Views
3K
3
Replies
102
Views
10K
Back
Top