Find the least positive integer $n$ such that $19n + 1$ and $95n + 1$ are both integer squares.

The answer is 134232.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Let $95n + 1 = { x }^{ 2 }$ and $19n + 1 = { y }^{ 2 }$ , for some positive integers $x$ and $y$ . Then ${ x }^{ 2 } - 5{ y }^{ 2 } = -4$ , which is generalized Pell equation with solutions given by

$\huge\ \frac { { x }_{ n } \pm { y }_{ n }\sqrt { 5 } }{ 2 } = { \left( \frac { 1\pm \sqrt { 5 } }{ 2 } \right) }^{ n }$ , $n = 1, 3, 5, ...$ .

Using the general formula for the Fibonacci sequence $\large\ { \left\{ { F }_{ k } \right\} }_{ k \ge 0 }$ , we conclude that $\large\ { y }_{ m } = { F }_{ 2m - 1 }$ , for $m = 1, 2, 3,...$ . It suffices to find the first term of the sequence $2, 5, 13, 34, 89, 233, 610, 1597, ...$ whose square is congruent to ${1} \pmod { 19 }$ . This term is ${ F }_{ 17 } = 1597$ , so the answer to the problem is

$\large\ n = \frac { 1 }{ 19 } \left( { { F }_{ 17 } }^{ 2 } - 1 \right) = \boxed{134232}$ .