Starting from the number $1$ we write down a sequence of numbers where the next number in the sequence is obtained from the previous one either by doubling it or rearranging its digits (not allowing the first digit of the rearranged number to be $0$) for instance a sequence might begin $$1,2,4,8,16,61,122,212,424,\ldots$$ Is it possible to make a sequence that ends in $1000000000$ and a sequence that ends in $9876543210$. Please show me how and if there is any working.
Asked
Active
Viewed 2,539 times
33
1 Answers
71
We first note that we can attain $1000$ from $1$ by $$1,2,4,8,16,32,64,128,256,512,125,250,500,1000$$ Therefore $1000^n$ can be attained by performing the same operations as above with $1$ replaced by $1000^{n-1}$.
On the other hand, note that rearranging the digits does not change the remainder when divided by $3$, and $2^n \neq 0 \pmod{3}$. Therefore the sequence would not reach any multiple of $3$.

Empiricist
- 7,933
-
-
What exactly is the sequence you listed? At first I thought you were doing Regis Philbin poetry. – corsiKa Aug 17 '15 at 14:08
46
you could get there by1*2=2 2*2=4 4*2=8 8*2=16 16*2=32 32->23 23*2=46
, by the number 125 you are already dealing with too much recursion. – Jason Sperske Aug 17 '15 at 12:28console.log(solve(1, 500, ' 1 ', true));
and get1 2 4 8 16 32 64 128 256 512 125 250 500
– Jason Sperske Aug 17 '15 at 15:45