The answer is
For $n=18$, B wins.
For $n=41$, A wins.
For $n=56$, B wins.
Actually this question is kinda same question as Halve or diminish, and race to unity!. The only difference is the methodology. You need to think of this question from the very beginning 2.
For $n=2$, A loses automatically since A can only remove 1 coin and and B will win by default.
Likely, For $n=3$, A win since A can only remove 1 coin and and B will end up with 2 coins, what happens before will happen to B.
For $n=4,5$, A wins.
Important: For $n=6$, A has 3 options, to remove 1,4 or 5 coins, if any of these options is lost for B somehow, A wins, otherwise B wins. This is the rule of this game. As a result;
The bold part repeats itself forever. You may find the general formulation on mod 8 accordingly:
If $(n\ mod\ 8) = 0 \ or\ 2$ B wins otherwise A wins.