Is it possible to find all integers m>0 and n>0 such that n+1∣m2+1 and m+1|n2+1 ?

I succeed to prove there is an infinite number of solutions, but I cannot progress anymore.

Thanks !

**Answer**

Some further results along the lines of thought of @individ:

Suppose p and s are solutions to the Pell’s equation:

−d⋅p2+s2=1

Then,

m=a⋅p2+b⋅pq+c⋅q2n=a⋅p2−b⋅pq+c⋅q2

are solutions if (a,b,c,d) are: (these are the only sets that I found using the computer)

(10,4,−2,−15)(39,12,−3,−65)

Sadly, the solutions are negative.

Here are some examples:

(m,n)=(−6,−38)(a,b,c,d,p,q)=(10,4,−2,−15,1,4)(m,n)=(−290,−2274)(a,b,c,d,p,q)=(10,4,−2,−15,8,31)(m,n)=(−15171,−64707)(a,b,c,d,p,q)=(39,12,−3,−65,16,129)(m,n)=(−1009692291,−4306907523)(a,b,c,d,p,q)=(39,12,−3,−65,4128,33281)(m,n)=(−67207138138563,−286676378361411)(a,b,c,d,p,q)=(39,12,−3,−65,1065008,8586369)

P.S. I am also very curious how @individ thought of this parametrization.

**Attribution***Source : Link , Question Author : uvdose , Answer Author : Yifan Zhu*