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;
1-) A
2-) B
3-) A
4-) A
5-) A
6-) A
7-) A
8-) B
9-) A
10-) B
11-) A
12-) A
13-) A
14-) A
15-) A
16-) B
17-) A
18-) B
19-) A
...
41-) A
....
56-) B
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.