Hello Jean Michel,
@Michael: an elegant and most impressive approach using deep functionalities of Mathematica.
Here is a simple if not crude and basic approach, showing that there are, depending on the choice of a0, lots of solutions. For the sake of simplicity I restrict the order of the polynomial to 3
hh[x_] := Sum[a[i] x^i, {i, 0, 3}]
abl = D[hh[x], x]
Get the equations
cox = Collect[hh[hh[x]], x];
coL = CoefficientList[cox, x];
a0 = 2.5;
eqs = Table[abl[[j]]/(x^(j - 1)) == (coL[[j]] /. a[0] -> a0), {j, 3}]
There may be complex solutions, which I will discard
sols = Select[Solve[eqs, {a[1], a[2], a[3]}] // N, FreeQ[#, Complex[_, _]] &] /. a[x_] :> a[Floor[x]]
And check the 1st three terms
Table[
{Take[Expand[hh[hh[x]] /. a[0] -> a0 /. sols[[j]]], 3], abl /. sols[[j]]},
{j, 1, 3}]