ÍD<&Ā
-1 byte thanks to @xnor and @Noodle9.
Try it online or verify the first \$[2,100]\$ test cases.
Explanation:
Í # Decrease the (implicit) input-integer by 2
# Check that this input-2 is a power of 2 by:
D # Duplicating it
< # Decrease the copy by 1 (so integer-3)
& # Take the bitwise-AND of input-2 and input-3
Ā # Check that this is NOT 0
# (after which the result is output implicitly)
But wait, I don't see any use of bases nor rotation!
When I saw the challenge in the Sandbox and was working on a solution, I noticed that the only falsey values in the first \$n=[2,500]\$ bases formed the sequence A056469: number of elements in the continued fraction for \$\sum_{k=0}^n (\frac{1}{2})^{2^k}\$, which could be simplified to \$a(n)=\left\lfloor2^{n-1}+2\right\rfloor\$. Here a copy of the first 25 numbers in that sequence as reference:
2, 3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610
It can also be note that all the numbers in this sequence are of the form \$a(n)=2^n+2\$, so checking whether \$n-2\$ is a power of \$2\$ will verify whether it's in this sequence. Since we want to do the invert here, and having a falsey result if it's in this sequence (or truthy if it's NOT in this sequence), we'll do just that, resulting in the code above.
Mathematical proof that all falsey cases of the Left-Rotate-Double numbers are of the form \$2^n+2\$:
Quote from @saulspatz at the Math SE, who provided me with this Mathematical proof to back up my theory I based on the first \$n=[2,500]\$ test cases. So all credit for this proof goes to him/her.
If \$m\$ is a \$(d+1)\$-digit Rotate-Left-Double number in base \$n\$, then $$m=xn^d+y\tag1$$ where \$d\geq1,\ 0<x<n,\ 0\leq y<n^d\$. (Includes the rule that the number can't start with \$0\$.) Rotating \$m\$ gives \$ny+x\$, so we have \$2xn^d+2y=ny+x\$ or $$(n-2)y=(2n^d-1)x\tag2$$ If \$n=2^k+2\$ then \$(2)\$ gives \$(n-2)|x\$ (which means \$x\$ is divisible by \$(n-2)\$), since \$2n^s-1\$ is odd. But then \$y\geq 2n^d-1\$ which contradicts \$y<n^d\$.
To show that these are the only falsey numbers, let \$p\$ be an odd prime dividing \$n-2\$. (Such a \$p\$ exists because \$n-2\$ is not a power of \$2\$.) In \$(2)\$ we can take \$x=\frac{n-2}p<n\$ and we have to show that there exist an exponent \$d>0\$ and \$0\leq y<n^d\$ such that $$py = 2n^d-1$$ If we can find a \$d\$ such that \$p|(2n^d-1)\$, we are done, for we can take \$y = \frac{2n^d-1}p<n^d\$.
By assumption, \$n-2\equiv0\pmod{p}\$ so \$n\equiv 2\pmod p\$. Therefore, $$2n^d\equiv1\iff 2\cdot2^d\equiv1 \iff 2^{d+1}\equiv 1\pmod p,$$ and by Fermat's little theorem, which states that \$a^{p-1}\equiv 1\pmod p\$, we can take \$d=p-2\$, because $$2^{p-2+1}\equiv 1 \iff 2^{p-1}\equiv 1 \pmod p$$
This completes the proof.
2^k+2
and 2? I think it's likely true. \$\endgroup\$m&-m==m
withm=n-2
after a proof is posted, or prove it yourself. Would it be too late to change the challenge to something like counting Rotate-Left-Double numbers, which is hopefully less shortcuttable? \$\endgroup\$n-2&n-3
. \$\endgroup\$