Question :- $A=k^2-1$ and $B=(k+1)^2-1$, where k is a natural number greater than 1. How many prime numbers are there by which both A and B are divisible for at least 1 value of k ?
I attempted this question by plugging different kinds of numbers from the families of primes into k
For instance, k to be a one of the number from Family of $2$ ($2n,2n+1$) then from Family of $3$ ($3n,3n+1,3n+2$)
For $k=3n+1$, I was able to get both A and B a multiple of $3$ , hence by hit and trial I confirmed $3$ to be one of the prime number by which A and B will be divisible, with k being of type $3n+1$
Now for how many prime numbers do I need to do the same thing $5$ $(5n+1,5n+2,5n+3,5n+4)$,$7$ $( 7n+1,7n+2,7n+3,7n+4,7n+5,7n+6)...$ ? How to solve the question efficiently?