Alignment of multiple bodies on circular paths Below is a problem that I came across in which I don't know the answer. It's as follows:
$\\$
Problem:
Suppose there are $n-2$ planets currently at rest (stationary) - all positioned on the positive side of the x-axis (line) of the euclidean plane. They will soon orbit on a circular motion around the sun. Each planet $k$ will travel at the same speed and have an orbit of length $k$ where $k=3,4,...,n$ and $n>4$. All orbits will lie on the euclidean plane and will be centred at the origin (where the sun is positioned). Suppose now that all planets leave their initial position of rest at the same time. From now on, two or more planets are considered to be aligned if they lie on the positive side of the x-axis (line) at the same time in their respective orbits. Now consider all the planets that won't be aligned with planet $n$ during its first orbit. How many of them will be aligned with at least one planet that will be aligned with planet $n$ (during the first orbit of planet $n$)?
$\\$
Additional Information:
In the previous version of this problem, I realised I had made the mistake of letting planet $n$ orbit the sun more than once which made it quite obvious that every other planet would be aligned with planet $n$ after a certain number of orbits - hence you have the second comment below and the answer (from 1st January) that were driven by this mistake. So I've now corrected the mistake by letting planet $n$ orbit the sun once only - which was my original intent.
 A: Planet $j$ has radius of orbit $r_j = \frac{j}{2\pi}$. Suppose, for simplicity, the linear speed of all planets is $1$. Then, the angular speed of planet $j$ is $$\omega_j = \frac{1}{r_j} = \frac{2\pi}{j} $$ and time period $$T_j = \frac{2\pi}{\omega_j} = j$$.
Now, planet $n$ will be precisely on the positive $x$-axis at time $t=0,n,2n\dots$ i.e. $t=k_1 n$.
Planet $j$ will be on the positive $x$-axis at $t=k_2 j$.
So, planets $n$ and $j$ will be aligned when $$k_1 n = k_2 j \implies n=\frac {k_1}{k_2} j$$ But this can always be achieved by setting $k_2 =j, k_1 = n$.
In other words, there is no planet that will never be aligned with planet $n$.
A: So, when planet $n$ meets the positive side of the $x$-axis the second time then it happens at the first orbit. Then planet $k<n$ is aligned with planet $n$ during its first orbit iff $k|n$. Then a planet $\ell$ is aligned with such planet $k\ne \ell$ (during the first orbit of planet $n$)  iff the least common multiple $[k,\ell]$ of $k$ and $\ell$ is at most $n$.

Now consider all the planets that won't be aligned with planet $n$ during its first orbit. How many of them will be aligned with at least one planet that will be aligned with planet $n$ (during the first orbit of planet $n$)?

The above follows that a planet $\ell$ belongs to the required set $S_n$ iff $\ell \not|n$ and ( $(\ell,n)\ge 3$ or $\ell q\le n$), where $q\ge 3$ is the smallest prime divisor of $n$ or $4=q|n$. Let $s_n=|S_n|$. When $n$ is prime then $s_n=0$. A quest to find $s_n$ is an integer challenge, but the respective sequence is not in OEIS.
A: As I understand the question, at the end of the single orbit for planet $n$ that we are considering, it will be alignment with all planets $\{k_i\}$ where each $k_i\mid n$ - that is all the factors of $n$ greater than $2$, since the orbital period is here directly proportional to the radius (all speeds are equal).
So these planets may also align with other planets not in this set, in earlier passes through the $x$-axis - for example, $n=28$ means that planet $n$ then aligns with planets $4$, $7$ and $14$, but on earlier orbits planet $4$ has also aligned with planets $8, 12, 16, 20$ and $24$ and planet $7$ with planet $21$.
For odd $n$ the missing planet $2$ will introduce no complications. Essentially there we can count all multiples of prime factors of $n$ and subtract off the actual factors of $n$.
For even $n$ we have to work around the missing planet $2$, but the concept is similar. Note, we can't treat $4$ as an "honorary prime" though since $n$ may be divisible by 8.
