There is a unique sequence of integers $a_1,a_2,\ldots,a_{2023}$ such that $\displaystyle\tan 2023x=\dfrac{a_1\tan x+a_3\tan^3x+a_5\tan^5x+\cdots+a_{2023}\tan^{2023}x}{1+a_2\tan^2x+a_4\tan^4x+\cdots+a_{2022}\tan^{2022}x}$ whenever $\tan 2023x$ is defined. What is $a_{2023}$?