View Single Post
Old May 3rd, 2008, 2:14 PM   #6
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 630
Rep Power: 4 Jessehk is on a distinguished road
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Sane, I have a question. In the beginner class, you state that

Quote:
Originally Posted by Rules
3) Unless n is prime, then n must decrease by 1.
Which to me implies that n must decrease by one except when it is prime. But your sample data seems to indicate otherwise.

For example,
You say a start of 2 2 should result in a chain of 2, 1.
However, 2 is prime. So it seems to me that the sequence should be 2 5.
When I change the rule to decrease by 1 only when n is prime, I can replicate your test case. Can you clarify please?
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote