# Strings of integers with palindromic substrings

I am trying to characterize strings of odd integers with certain properties. Namely, I would like to find odd integers $$a_1,\dots,a_h,b_1,\dots,b_{h-1} \ge 3$$ such that the string $$s$$

$$a_1,\dots,a_{h-1},a_h,a_{h-1},\dots,a_1,b_1,\dots,b_{h-1},b_{h-1},\dots,b_1,a_1+2,a_2,\dots,a_{h-1},a_h,a_{h-1},\dots,a_1,b_1,\dots,b_{h-1},b_{h-1},\dots,b_1$$

contains a substring $$s'$$ equal to

$$a_1,\dots,a_{h-1},a_h,a_{h-1},\dots,a_2,a_1+2,b_1,\dots,b_{h-1},b_{h-1},\dots,b_1$$.

Here is what I tried. I assumed, as an example, that the substring $$s'$$ ended on some $$b_{\ell}$$ in the second occurrence of the substring $$b_1,\dots,b_{h-1}$$ in $$s$$. I got a linear system of $$2h-2$$ equations in the $$2h-1$$ variables $$a_1,\dots,a_h,b_1,\dots,b_{h-1}$$, and I tried to apply Gaussian elimination, but at some point it got too intricate. I solved the system for some values of $$h$$ and $$\ell$$; fixing $$\ell$$ and letting $$h$$ vary, the solutions seem to follow some kind of pattern of length $$2\ell+1$$. This makes me think that maybe even some techniques from number theory and linear algebra may be useful.

Is there some more effective method to find the solutions, or at least to characterize them in some way? My area of expertise is very far from this, so any help would be appreciated.