Setup If we are given $a,b,c,d$, then the system of equations $$ \begin{align} p+r & =a, \tag {1a}\\ pr+qs & =b, \tag {1b}\\ p(s+1)+qr+r & =c, \tag {1c}\\ 2pr+qs+2 & =d \tag {1d}\\ \end{align} $$
can be solved for $p,q,r,s$, not necessarily integers, because the equations are all independent. The outline is we find $pr = d - b - 2$ by solving Eqns. $(1b), (1d)$ then use it with $(1a)$ to solve for $p,r$. A similar approach is used for solving for $q,s$.
The linear diophantine equation
$$ -2a+2b-2c+d = n \tag 2 $$
has an infinite number of solutions in integers for $a,b,c,d$.
Question: Given only $n$, find all integer solutions for $p,q,r,s,a,b,c,d$ simultaneously satisfying Eqns. $(1)$ and $(2)$. How do we solve this?
Approach tried: I was able to find a particular solution
$$ \begin{align} b & =d - 2 , \\ p & =0, \\ q & = {{c - a} \over {a}}, \\ r & =a, \\ s & =-{{a (d - 2)} \over {a - c}} = {{b} \over {q}}, \\ a(a - c) & ≠0. \end{align} $$
$$-2a+2b-2c+d = n\tag{2}$$ From equation $(1)$, equation $(2)$ becomes to $$-2p-4r+4pr+3qs-2p(s+1)-2qr+2=n$$ Let solve for $p$, then $$p = \frac{1}{2}\frac{-4r+2+3qs-2qr-n}{2+s-2r}$$ We consider the case for $2+s-2r =1$ and we get $(r,s)=(1+m, -1+2m)$.
Hence we get $$p = 1+2m+\frac{5}{2}q-2qm+\frac{1}{2}n$$ We know $p$ is integer when $n$ and $q$ have same parity.
$\bullet$ Case of $(n,q)=(2h+1, 2k+1)$: We get a partial solution for odd $n$: $(p,q,r,s,a,b,c,d)=(4+5k-4mk+h,\ 2k+1,\ 1+m,\ -1+2m,\ (1-4k)m+5+5k+h,\ -4m^2k+(6+5k+h)m+3+3k+h,\ -8m^2k+(10+12k+2h)m+2+2k,\ -8m^2k+(6k+10+2h)m+9+8k+2h)$ $h,k,m$ are arbitrary integers.
$\bullet$ Case of $(n,q)=(2h, 2k)$: We get a partial solution for even $n$: $(p,q,r,s,a,b,c,d)=((2-4k)m+1+5k+h,\ 2k,\ 1+m,\ -1+2m,\ (3-4k)m+2+5k+h,\ (2-4k)m^2+(3+5k+h)m+1+3k+h,\ (4-8k)m^2+(3+12k+2h)m+1+2k,\ (4-8k)m^2+(6k+6+2h)m+4+8k+2h)$ $h,k,m$ are arbitrary integers.