Sieving all the numbers $j$ with $\gcd(j,n)=1$ and $1\leq j \leq n$

53 Views Asked by At

First, I define $\phi(a,n)$ as $$\phi(a,n)=\sum_{1\leq j\leq n, gcd(j,a)=1}1.$$ I want to calculate $\phi(ap,n)$ in terms of $\phi(a,n)$ and $p$. We assume that $p$ is prime and $\gcd(a,p)=1$. To me, it seems clear that $$\phi(ap,n)=\lceil \phi(a,n)(1-\frac{1}{p}) \rceil$$ but I do not know how to prove it. Note that another way of describing the $$\mid S\mid = \phi(a,n)=\#\{1\leq j\leq n, \gcd(j,n)=1\}$$ or the number of integers lesstan or equal to $n$ that are relatively prime $a$. So taking away all the multiples of $p$ from $S$ should be $$\lceil \mid S \mid (1-\frac{1}{p}) \rceil$$ as an equivelant of the problem. How can I solve this?

1

There are 1 best solutions below

0
On

The conjectured identity is false in general. Let $p$ be an odd prime, and set $n=p+1$ and $a=(p-1)!$. Then $$ \phi(a,n) = \sum_{\substack{1\le j\le p+1 \\ \gcd(j,(p-1)!)=1}} 1 = \sum_{j\in\{1,p\}} 1 = 2, $$ while $$ \phi(ap,n) = \sum_{\substack{1\le j\le p+1 \\ \gcd(j,p!)=1}} 1 = \sum_{j\in\{1\}} 1 = 1 \ne 2 = \lceil 2 (1-\tfrac1p) \rceil = \lceil \phi(a,n) (1-\tfrac1p) \rceil. $$