login
Number of steps required in the worst case for three knights to find the princess in a castle with n rooms arranged in a line (Castle and princess puzzle).
2

%I #9 Jun 03 2018 16:49:30

%S 1,1,1,2,2,2,2,3,4,4,4,4,5,6,6,6,6,7,8,8

%N Number of steps required in the worst case for three knights to find the princess in a castle with n rooms arranged in a line (Castle and princess puzzle).

%C The main entry for this problem is A300576. In this version there are three knights who are searching for the princess; each knight can search a different room.

%H Dmitry Kamenetsky, <a href="/A301426/a301426.txt">Optimal solutions</a>

%F It seems that for n >= 3:

%F if n = 3 mod 5, then a(n) = (n - 3)/5*2 + 1,

%F otherwise a(n) = floor((n - 4)/5)*2 + 2.

%Y Cf. A300576, A301337.

%K nonn,more

%O 1,4

%A _Dmitry Kamenetsky_, Mar 21 2018