Page 1 of 1
Problem 321
Posted: Sun Jan 23, 2011 1:38 pm
by LarryBlake
Problem 321 (
View Problem)
Can a counter jump another counter of the same color?
Re: Problem 321
Posted: Sun Jan 23, 2011 6:00 pm
by GenePeer
Whichever the case, I doubt it would provide the optimal solution.
This is the first "new" problem I have tried, as I prefer solving sequentially. I'm currently at 103. I've found a formula for the number of moves needed, and was able to generate the first 22 terms. It could take days if I continued like this. Can someone hint me in the right direction?
Re: Problem 321
Posted: Sun Jan 23, 2011 6:04 pm
by stijn263
Can you perhaps spot a pattern among those first 22 terms?
Have fun solving!
Re: Problem 321
Posted: Sun Jan 23, 2011 8:37 pm
by GenePeer
Why did I think there's no possible pattern? Thank you, I just had my first post in an unarchived thread.
Re: Problem 321
Posted: Sun Jan 23, 2011 10:41 pm
by sivakd
GenePeer, congratulations. I just noticed that you are the only person from your country. So, a good achievement indeed.
GenePeer wrote:Why did I think there's no possible pattern? Thank you, I just had my first post in an unarchived thread.
Re: Problem 321
Posted: Mon Jan 24, 2011 12:19 am
by john.schooling
I get 5=99, 10=8108, 20=54608372. Can anyone confirm this is correct please. My answer to 40 terms is incorrect. I may have a rounding or overflow problem.
Thanks.
Re: Problem 321
Posted: Mon Jan 24, 2011 12:26 am
by jaap
Those numbers are correct.
Re: Problem 321
Posted: Mon Mar 14, 2011 11:35 pm
by gotclout
john.schooling wrote:I get 5=99, 10=8108, 20=54608372. Can anyone confirm this is correct please. My answer to 40 terms is incorrect. I may have a rounding or overflow problem.
Thanks.
I'm having a similar issue, however I'm making a first attempt to solve this in python and I'm not sure if the problem could be rounding or overflow.
Re: Problem 321
Posted: Wed Apr 20, 2011 6:52 am
by ingreenheaven
GenePeer wrote:Why did I think there's no possible pattern? Thank you, I just had my first post in an unarchived thread.
I can't see the pattern

Re: Problem 321
Posted: Wed Apr 20, 2011 8:02 pm
by ingreenheaven
My answer for 20 matches with the answers above, but my final answer is not correct. Can somebody verify if these values are correct. 25: 636562052 and 30: 1583407950?
Also any push in the right direction for identifying the pattern will be very helpful.
Re: Problem 321
Posted: Wed Apr 20, 2011 8:14 pm
by jaap
ingreenheaven wrote:My answer for 20 matches with the answers above, but my final answer is not correct. Can somebody verify if these values are correct. 25: 636562052 and 30: 1583407950?
No. You probably have a 32 bit integer overflow problem. You need 64 bit integers.
Re: Problem 321
Posted: Wed Apr 20, 2011 8:15 pm
by ingreenheaven
jaap wrote:ingreenheaven wrote:My answer for 20 matches with the answers above, but my final answer is not correct. Can somebody verify if these values are correct. 25: 636562052 and 30: 1583407950?
No. You probably have a 32 bit integer overflow problem. You need 64 bit integers.
Thank you.
Re: Problem 321
Posted: Thu Apr 21, 2011 6:57 am
by ingreenheaven
Done. It was a problem with precision. The pattern that I thought was there didn't work because of precision error and so I thought I was missing something. Thanks for your help.
Re: Problem 321
Posted: Wed Dec 17, 2014 11:26 pm
by DeEiserne
There's something I don't quite understand:
If we take n=2, then we have 2 red, 2 blue counters. Let's just write the configuration as 1 2 3 4 5 , where 1 and 2 are initially occupied by the 2 red counters, etc. For n=2, there is a solution with 8 actions:
2 -> 3
4 -> 2
5 -> 4
3 -> 5
1 -> 3
2 -> 1
4 -> 2
3 -> 4
M(1) is clearly 3 and M(3) is clearly 15, so according to the problem's description, M(2) should be 10. But M(2) is 8 (see above) and 8 is clearly not a triangle number.
What am I doing wrong?
Re: Problem 321
Posted: Wed Dec 17, 2014 11:40 pm
by mpiotte
DeEiserne wrote:There's something I don't quite understand:
If we take n=2, then we have 2 red, 2 blue counters. Let's just write the configuration as 1 2 3 4 5 , where 1 and 2 are initially occupied by the 2 red counters, etc. For n=2, there is a solution with 8 actions:
2 -> 3
4 -> 2
5 -> 4
3 -> 5
1 -> 3
2 -> 1
4 -> 2
3 -> 4
M(1) is clearly 3 and M(3) is clearly 15, so according to the problem's description, M(2) should be 10. But M(2) is 8 (see above) and 8 is clearly not a triangle number.
What am I doing wrong?
You misread the question. Nowhere is the value of M(2) provided. The problem statement gives that M(3) = 15 and that M(1), M(3), M(10), M(22) and M(63) are triangular numbers (without giving the value).
Re: Problem 321
Posted: Thu Dec 18, 2014 1:50 pm
by DeEiserne
Oh my god, I feel so stupid. Thank you for the clarification!
Re: Problem 321
Posted: Mon Sep 10, 2018 12:52 pm
by Jochen_P
stijn263 wrote: Sun Jan 23, 2011 6:04 pm
Can you perhaps spot a pattern among those first 22 terms?
Have fun solving!
hmm ... pattern spotting ... 1,3,10,22,63,1nn,3nn
Nope, don't see any. Any hint?
Got the same results as others for 20(correct), 25(false) and 30(false)
Re: Problem 321
Posted: Tue Sep 11, 2018 8:33 am
by Jochen_P
Got it ... very nice pattern, not easy to spot