Proving a sharp maximum identity for some relatively prime odd integers Let $p, q$ and $r$ be relatively prime odd positive integers satisfying $$pq + pr - qr = 1$$ and $$1<p<q<r.$$
Define $$f(a,n)= -(q + r)a^2 + 4aqn - 4(q - p)n^2 - 4n$$ where $-p \leq a \leq p+2$ and $1 \leq n \leq r-1$.
Under these conditions, can we prove that 
$$\mathrm max \{ f(a,n) \} =f(1,1)$$
Or can one produce a counterexample?
For example, I proved the above idendity for triplets $$(p,q,r)=(2k+1,4k+1,4k+3)$$ and $$(p,q,r)=(4k+3,6k+5,12k+7)$$ by showing $$-f(a,n) + f(1,1) \geq 0$$ with the help of basic number theoretic arguments.
Any contribution (proof suggestion or a counterexample) will make me extremely happy...
EDIT
The above numbers have meaning in topology. For example, consider Pretzel knots $K(-p,q,r)$ where $p, q$ and $r$ are relatively prime odd positive integers satisfying $$pq + pr - qr = 1.$$
Then the Alexander polynomial associated to these knots is $1$, i.e,. $$\Delta_K(K(-p,q,r))=1,$$ see pg. 66, Example 6.9, W. B. Raymond Lickorish - An Introduction to Knot Theory.
Following Freedman's excellent paper, one can conclude that $K(-p,q,r)$ are topologically slice.
 A: From $pq = 1 + r(q-p)$ we find that $q > p$ unless both are $1.$
with $p=q=1,$ odd positive $r,$ the value 
$$ f(0,0) > f(1,1) $$
A: // language is called C++   
//  anything after a // sign is ignored by the computer

int main()
{
 //  system("date");

int bound = 135;

int goon = 1;

for(int q = 3; goon && q < bound; q += 2){
for(int p = 1; goon && p < q; p += 2 ){

  if( (p*q - 1) % (q-p) == 0 )
  {
    int r =  (p*q - 1) / (q-p) ;
    if( r % 2 == 1 && r > q)
    {
 //     cout << " p " << p <<  "     q  " << q << "     r  " << r ;
   //   if( twogcd(p,q) > 1 || twogcd(q,r) > 1 || twogcd(r,p) > 1 ) cout << "  pair ";
   //   cout << endl; 

      int a = 1;
      int n = 1;


      int remember = -(q+r) * a * a + 4*q*a*n - 4*(q-p)*n*n - 4*n;

      for(a = -p; goon && a <= p+2; ++a){
      for(n = 1; goon && n <= r-1; ++n){

       int f = -(q+r) * a * a + 4*q*a*n - 4*(q-p)*n*n - 4*n;
        if ( f > remember)
        {
          cout << "   WOW    " ;
       //    goon = 0;
          cout << " p " << p <<  "     q  " << q << "     r  " << r << "  a  " << a << "   n  "   << n << "    1_1: " << remember << "  f  "  << f << endl ;

        } // if f

      }}  // a n




    } // if r odd 
  } // if %


}} // p q

 // system("date");
   cout << endl << endl;
  return 0;
}

=-=-=-=-=-=-=
