I saw this problem the other day at work and found it pretty interesting:
$$xyz + xyz = zyx$$
Find $x, y, z$ and the base(s) which this is true.
Note that $x,y,z$ are simply digits concatenated, they are not multiplied against each other. I ended up writing a program to brute force all solutions with base 2 - base 36. I left out $x=0,y=0,z=0$ since that seems trivial to me.
The solutions I found are below (I included the b10 value of xyz for reference):
x=0,y=1,z=1,b=2, ->b10 value=3
x=1,y=4,z=3,b=5, ->b10 value=48
x=2,y=7,z=5,b=8, ->b10 value=189
x=3,y=a,z=7,b=11, ->b10 value=480
x=4,y=d,z=9,b=14, ->b10 value=975
x=5,y=g,z=b,b=17, ->b10 value=1728
x=6,y=j,z=d,b=20, ->b10 value=2793
x=7,y=m,z=f,b=23, ->b10 value=4224
x=8,y=p,z=h,b=26, ->b10 value=6075
x=9,y=s,z=j,b=29, ->b10 value=8400
x=a,y=v,z=l,b=32, ->b10 value=11253
x=b,y=y,z=n,b=35, ->b10 value=14688
Looking at the solution set, I noticed a few relationships which surprised me:
- $x$ is valid for integers [0-11]
- $y = 3x+1$
- $z = 2x+1$
- $R\text{ ($xyz$ in base 10)} = 9x^3 + 21x^2 + 15x + 3$
Are these formula's just chance? Or can they actually be derived without knowing the solution set ahead of time?
I started trying to work out a general solution and got stuck pretty fast:
$$2xb^2 + 2by + 2z = zb^2 + by + x$$
And then I stopped because I didn't understand how to find four unknowns with one equation. Thoughts?
Th e equation you described can be written: $$2xb^2 + 2by + 2z = zb^2 + by + x$$ with the constraint $0\leq x,y,z \leq b-1$ now the first thing to do is to find $z$, we have $2z=x\mod b$ so we have two cases :
This formula works for your given values, and if you want to find the value of $x$ you can replace in the equations $b=3x+2$ so that you obtain: $$b=3x+2,y=3x+1,z=2x+1, R=9x^3+21x+15x+3$$