I have a question about primality of integers in the form of $2n^2-1$.
I can prove that for the certain type of n such integers are always composite. For example, if $n=7k+2$ or $n=7k+5$, the whole expression would be always divisible by $7$.
The same is applicable to the whole (probably infinite) set of numbers in the form of $n=ak+b$, where $a$ is $7$, $17$, $23$ etc. and $b$ usually has two values (like $2$ and $5$ for $a=7$). ($a$ is prime here and $b \le a-1$)
I also suspect that the only composite values of $2n^2-1$ are those whose factors are from that set of a (like $7$, $17$, $23$ etc.).
I am trying to see if there anything else can be said about primality or compositness of those numbers $n$. Is there any other forms of n that can guarantee compositness (or primality)?
I would appreciate any ideas.