I have a big field of mine which it’s divided from that of my neighbor by a straight line of willows and oaks. Trees of the same kind are divided by 10 and 15 other trees; this means that, for example, if tree n.1 is a willow also tree n.12 and tree n.17 will be willows, and the same holds for oaks. Given that there’s at least an oak and at least a willow, what is the maximum number of trees along my border?


(Confession: I got a computer to do some of the gruntwork for this answer.)

You can manage it with

25 trees: number from 0 and make trees 4,9,15,20 be of one type and the others of the other.

But you can't manage it with more because

if you have any 26 consecutive trees, number them from 0 and note that 10~21~5~16~0~11~22~6~17~1~12~23~7~18~2~13~24~8~19~3~14~25~9~20~4~15 and that's all of them.

| improve this answer | |
  • $\begingroup$ Well, I was about to come to that conclusion <sigh> ninja'd again... $\endgroup$ – Excited Raichu Nov 19 '18 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.