Inspired by this question For any odd number, $n$, does there always exist $k$ such that $2^k-1$ is a multiple of $n$?, I searched for duplicates and there are many, all having almost invariably the same answer involving Euler's theorem and totient function.
My exact question is the following:
given $n$ odd, does there exist a calculable function $f(n)$ which would not involve the knowledge of the prime factors of $n$ such that $2^{f(n)}\equiv 1\pmod n$
Obviously $f(n)$ is a multiple of $\lambda(n)$ the Carmichael function, and I know it is not possible to solve the more general problem $a^{f(n)}\equiv 1\pmod n$ for any base $a$ since this would be a hack against the RSA encryption system (and this would be known...), but is it at least possible when $a=2$ ?
I have seen in this thread For what prime numbers $p\gt2$ number $2^{2^p} -1$ is divisible by $p$? that $f(n)=2^n$ is possible for certain values of $n$ but not all.
Note, that this is mainly out of curiosity, I suspect though that it might be impossible too.