# Counting numbers of the form $ai + bj + cij$ and finding related L-series?

Let $a,b,c$ be given nonnegative integers with $gcd(a,b,c)=1$. Consider a given positive integer $n$ and positive integers $i,j$.

Let $f_n(a,b,c)$ be the number of distinct solutions to $1<ai + bj + cij<n$.

As an example $f_n(1,1,2) = n-(\pi(2n+1)-1)$ where $\pi$ is the prime counting function.

And ofcourse $f_n(0,0,1)=n-\pi(n)$. Other easy ones are $f_n(0,b,c)$ or $f_n(a,b,0)$.

But how about the general case ?? How about $f_n(2,3,5)$ ?

I assume there is alot of theory behind this such as closed form identities, recursions, related L-series, GRH analogues and sieves. And what about the circle method ; can it be used here ?

Are there generalizations to PNT involved ?

I would like to understand $f_n(a,b,c)$ better.

EDIT !!

I have seen tommy1729 today and he guessed that for $a=2,2<p<q$ and $p,q$ a prime twin or a sophie germain prime pair, we have that $f_n(2,p,q)$ ~ $n - \dfrac{\alpha\pi(n)}{q!}$ where $\alpha$ is an integer.

For instance $f_n(2,3,5)$ should be about $n - \dfrac{\pi(n)}{k}$ where $k$ is $2$ or $3$. The "logic" is suppose to be that we sieve out multiples of type $5n+2$ or $5n+3$ for numbers of type $5n + 6$ as explained by Gerry Myerson's answer.

This sieved part is suppose to be something like $\dfrac{n}{\sum \dfrac{1}{5y+m}}$ for $m=2,3$ or such, from where $n - \dfrac{\pi(n)}{k}$ follows.

I wondered about products like $\prod_{X=5n+2} (1-\dfrac{1}{X})$.

I was fascinated by that quick brute guess he made. Could it be true ?

COMMENT

I forgot to mention sophie germain prime pair in my first edit so I edited my first edit, and by this comment I hope this does not go unnoticed. Sorry for being sloppy.

• I don't understand why $f_n(0,0,1)=n-\pi(n)$. It seems like $f_n(0,0,1)$ is the number of integer points under the hyperbola, which is closer to $n\log n$. – Eric Naslund Aug 9 '13 at 21:41
• Are you joking ? – mick Nov 18 '14 at 23:26
• I don't think @Eric is joking. $f_n(0,0,1)$ is the number of solutions $(i,j)$ to $1<ij<n$, so it's the number of points $(i,j)$ under the hyperbola $xy=n$, well-known to be asymptotic to $n\log n$. – Gerry Myerson Nov 19 '14 at 3:32

$1\lt2i+3j+5ij\lt n$, $5\lt10i+15j+25ij\lt5n$, $11\lt(3+5i)(2+5j)\lt5n+6$ so you're summing a divisor function, the one that counts the number of divisors of $5m+6$ that are $2\pmod5$.
• Sure. Multiply by $c$, add $ab$, and factor as $(a+cj)(b+ci)$. – Gerry Myerson Nov 19 '14 at 3:35