Find prime number $p$ such that $19p+1$ is a square number. 
Find prime number $p$ such that $19p+1$ is a square number.

Now, I have found out, what I think is the correct answer using this method.
Square numbers can end with - $1, 4, 9, 6, 5, 0$.
So, $19p+1$ also ends with these digits.
Thus, $19p$ ends with - $0, 3, 8, 5, 4, 9$.
As $p$ is either odd or $2$. So, $19p$ is either odd or ends with $8$.
So, we can say that $19p$ ends with - $3, 8, 5, 9$.
So, $p$ ends with - $7, 2, 5, 1$.
As $19*7$ end with $3$, $19*2$ ends with $8$ etc.
Thus, possible one digit values of $p$ - $2, 7, 5$.
$$19*2+1=39$$
$$19*7+1=134$$
$$19*5+1=96$$
None of these are square numbers.
Possible two digit values of $p$ - $11, 17$.
$$19*11+1=210$$
$$19*17+1=324=18^2$$
Thus, $p=17$.
But, I am not satisfied with the solution as it is basically trial and error. Is there a better way to do this?

It's generally not a good idea to try to solve problems like this by looking at decimal digits. Pay more attention to properties of divisibility.
You want $19p+1 = x^2$ for a positive integer $x$, so
$$
19p = x^2 - 1 = (x+1)(x-1).
$$
Comparing the two factorizations $19p$ and $(x+1)(x-1)$ is the key point.
Since $x^2 = 19p + 1 > 19$ the numbers $x+1$ and $x-1$ are both greater than $1$, so by uniqueness of prime factorization either (i) $x+1 = 19$ and $x-1 = p$, or (ii) $x+1 = p$ and $x-1 = 19$.  In the first case $x = 18$, so $p = x-1= 17$. In the second case $x = 20$ and $p = x+1 = 21$.  But $21$ is not prime, so the second case doesn't actually occur. Hence $19p+1$ can be a perfect square for prime $p$ only when $p = 17$, and when $p = 17$ we do get a solution since $(19)(17)+1 = 324 = 18^2$.
