OFFSET
1,2
COMMENTS
a(n) is the maximum number of turns that player A needs to identify with certainty the location of the coin that player B has hidden in one box in a row of n + 1 boxes. Player A starts by opening one of the boxes to see if the coin is in that box. After that, B secretly relocates the coin from its current box to one of the neighboring boxes, except when n = 1. In that case the game ends before B can relocate the coin. On each turn player A opens one box and when player A can tell in which box the coin is located, the game ends. Can be proved. - Bob Andriesse, Dec 22 2017
LINKS
Iain Fox, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1)
FORMULA
MATHEMATICA
Sort[Join[{1, 3}, 2*Range[60]]] (* Harvey P. Dale, Feb 04 2015 *)
PROG
(Haskell)
a004278 n = if n <= 3 then n else 2 * (n - 2)
a004278_list = [1, 2, 3] ++ [4, 6 ..]
-- Reinhard Zumkeller, Nov 10 2012
(PARI) first(n) = Vec((x + x^5)/(x - 1)^2 + O(x^(n+1))) \\ Iain Fox, Dec 21 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Nov 10 2012
STATUS
approved