SolutionWhen total matchstick is 1, B will surely win as A is the one who is picking up matchstick first.
When total matchstick is 2, A will surely win as A will pick one matchstick then B has to pick last one.
When total matchstick is 3, A will surely win as he takes up a strategy so that B will have last matchstick to pick up. So A will pick 2 matchstick.
When total matchstick is 4, B will surely win as if A picks up one matchstick, remaining matchsticks will be 3 and we know that when total 3 matchsticks are there then the one, who is picking up matchstick first, is winning surely.
When total matchstick is 5, A will surely win as he takes up a strategy so that B will have last matchstick to pick up. So A will pick 1 matchstick first, then 4 matchsticks will be there and we know that the one, who picks up matchstick second now, will win. Hence A will win.
When total matchstick is 6, A will surely win either he takes up a strategy so that B will have last matchstick to pick up. So A will pick 2 matchstick first, then 4 matchsticks will be there and we know that the one, who picks up matchstick second now, will win. Hence A will win.
Hence it is making a pattern when number of matchsticks are 1,4,7,10......N then B is winning the game.
So here minimum value of N greater than 5 will be 7.