Consider the finite cyclic group $\mathbb Z_{150}$. Consider the cyclic subgroup generated by $[5]$ which is $\langle[5]\rangle=\{[5],[10],[15],\ldots ,[145],[0]\}$ . Find the number of those $[a]\in \langle[5]\rangle$ such that $\gcd(a,6)=1$
My try
I know $150=2.3.5^2$. Now if I write in explicitly in hand, I found set of all $a$ such that $\gcd(a,6)=1$ to be the following set:
$\{5,25,35,55,65,85,95,115,125,145\}$.
Is there any explicit formula to calculate the above?
I will be grateful for some help.
In general my question is :
If $n=\prod_{i=1}^k p_i^{\alpha_i}$ what will be the number of those $[a]\in \langle p_k\rangle $ such that $\gcd(a,p_1p_2\cdots p_{k-1})=1$?
$[a]\in \langle[5]\rangle$ if and only if $a=5n$ for some integer, $1 \le n \le 29$.
$(a,6)=1 \iff (5n, 6)=1 \iff 2 \not \mid n \vee 3 \not \mid n$
There are $14$ multiples of $2$ between $1$ and $29$.
There are $9$ multiples of $3$ between $1$ and $29$.
There are $4$ multiples of $6$ (both $2$ and $3$) between $1$ and $29$.
Hence there are $14 + 9 - 4 = 19$ multiples of $2$ or $3$ between $1$ and $29$.
Hence there are $10 = 29-19$ elements $[a]\in \langle[5]\rangle$ such that $(a,6) = 1$.