Problem

Source: X International Festival of Young Mathematicians Sozopol 2019, Theme for 10-12 grade

Tags: number theory, algebra, polynomial



For $\forall$ $m\in \mathbb{N}$ with $\pi (m)$ we denote the number of prime numbers that are no bigger than $m$. Find all pairs of natural numbers $(a,b)$ for which there exist polynomials $P,Q\in \mathbb{Z}[x]$ so that for $\forall$ $n\in \mathbb{N}$ the following equation is true: $\frac{\pi (an)}{\pi (bn)} =\frac{P(n)}{Q(n)}$.