Return of the Hydra Slayer Its been a while since you killed that hydra, you basked in the glory for years, but now people are calling you washed up, a has been.  Well its time you prove them wrong, you've heard the whereabouts of annother hydra.  Simply kill it and you will be awarded all the glory you deserve.

You arrive at the armory to receive your swords but they're all out of regular swords all they have left are Sectors.  An n-sector will divide the number of heads on a Hydra by n, but can only be used if the number of heads is divisible by n.

Once again you are going to write some code to help you slay the hydra.
Your code will take as input the number of head the hydra, begins the fight with, the number of heads the hydra grows each turn, and a list of n-sectors you can use.  Your code will output an optimal pattern of moves to slay the hydra as quickly as possible

Each turn of the fight you may select a single sword to use, if after a slice the hydra has only one head you win, if not it grows heads.  You may never make no move, and if there are no possible moves available you lose.

If no solution is possible you may output anything other than a solution, e.g. an empty list, nothing, the number zero, etc.

This is code-golf so answers will be scored as their byte counts, with less being better.

Test cases

Here are some super basic test-cases, more test-cases will be added upon request.

24 heads, 1  heads per turn, [2,3] -&gt; [3,3,2,3]
25 heads, 2  heads per turn, [2,3] -&gt; No solutions
4  heads, 2  heads per turn, [2]   -&gt; No solutions
4  heads, 3  heads per turn, [2,5] -&gt; [2,5]
10 heads, 17 heads per turn, [2, 3, 7, 19] -&gt; No solutions
10 heads, 6  heads per turn, [1,16] -&gt; [1,16]
6  heads, 2  heads per turn, [2, 3, 5] -&gt; [2, 5]
125 heads, 1  head per turn, [1, 2, 3, 127] -&gt; [1, 1, 127]
JavaScript, 191 190 bytes

Saved a byte thanks to Step Hen

(h,t,s)=&gt;eval(`r=[],d=0,q=[],s.map(a=&gt;q.push([],h));while(q.length){p=q.shift(),h=q.shift(),s.map(w=&gt;(a=h/w)==1?d=w:!(a%1)&amp;!r[a+=t]?r[q.push([...p,w],a),a]=1:0);d?(q=[],p).push(d):0}d?p:[]`)




f=(h,t,s)=&gt;eval(`r=[],d=0,q=[],s.map(a=&gt;q.push([],h));while(q.length){p=q.shift(),h=q.shift(),s.map(w=&gt;(a=h/w)==1?d=w:!(a%1)&amp;!r[a+=t]?r[q.push([...p,w],a),a]=1:0);d?(q=[],p).push(d):0}d?p:[]`)

console.log(`[${f(24, 1, [2,3])}]`);
console.log(`[${f(25, 2, [2,3])}]`);
console.log(`[${f(4, 2, [2])}]`);
console.log(`[${f(4, 3, [2,5])}]`);
console.log(`[${f(10, 17, [2, 3, 7, 19])}]`);
console.log(`[${f(10, 6, [1,16])}]`);
console.log(`[${f(125, 1, [1, 16])}]`);
console.log(`[${f(1024, 3, [1, 2, 137])}]`);