Well, I am trying to find a general formula for the following statement.
Simplify the formula stated below, where the $\gcd$ is taken of a binary number $n_2$ and its digit resverse in binary.
Mathematically speaking:
$$f(n_2):=\gcd\left(n_2,\text{digitreverse}\left(n_2\right)\right)\tag1$$
EDIT: I am a student in computer science and I am trying to do this operation for very large values of n10 which makes it impossible to it case by case. I am trying to compute this up to $n_{10}=10^{35}$.
Examples:
- When $n_{10}=12345$, we get $n_2=11000000111001$ and $\text{digitreverse}\left(11000000111001\right)=10011100000011$: $$f(11000000111001)=\gcd\left(11000000111001,10011100000011\right)=33\tag2$$
- When $n_{10}=54321$, we get $n_2=1101010000110001$ and $\text{digitreverse}\left(1101010000110001\right)=1000110000101011$: $$f(1101010000110001)=\gcd\left(1101010000110001,1000110000101011\right)=1\tag3$$