# Solve for the Number in the number..square..cube relationship

Each letter stands for a distinct digit...no computer or calculator needed. Just pure logic and some mental multiplication.

CUBE is a concatenated number and it is a cube. X denotes multiplication.

(CUBE) = (N - U + M - B + E + R ) x (( S + Q + U + A - R )x E))

Find all the digits-corresponding to each number without using computer or calculator.

We know

C is not zero (leading zeroes are generally frowned on).
E is not zero (we multiply by E on the right side).
The cube must be between 11^3 and 21^3 to be a four digit number not ending in 0, and can't be 20^3. That leaves 10 possibilities.
The cube must have all four digits distinct.
That rules out 11^3 (which starts and ends with 1), leaving 9 possibilities.
Some mental multiplication gives possibilities for those 9:
(12) 1728, (13) 2197, (14) 2744, (15) 3375, (16) 4096, (17) 4913, (18) 5832, (19) 6859, (21) 9261.
We rule out two of those nine for repetition of digits.
That cuts it to 7, giving us 7 choices for CUBE.

Now ...

We know we multiply by E to get CUBE, so CUBE must have E as one of its factors.
That rules out 2197, 4096, 4913, 6859. We're down to just 1728, 5832, and 9261 as choices for CUBE.

So now we look at those.

9261 = (N-2+M-6+1+R) x (S+Q+2+A-R) x 1 // left to assign: 0,3,4,5,7,8
the max N+M+R can be is 5+7+8=20 so the first term can be at most 13.
there's no way the second term can be large enough to make the equation true. Eliminated.

5832 = (N-8+M-3+2+R) x (S+Q+8+A-R) x 2 // left to assign: 0,1,4,6,7,9
the max N+M+R can be is 6+7+9=22 so the first term can be at most 13.
there's no way the second term can be large enough to make the equation true. Eliminated.

Which leaves

1728 = (N-7+M-2+8+R) x (S+Q+7+A-R) x 8 // left to assign: 0,3,4,5,6,9
The x 8 means the other two terms only need to reach a product of 216.
N+M+R can be between 0+3+4=7 and 5+6+9=20 so the first term could be between 6 and 19.
S+Q+A-R similarly can be between 0+3+4-9=-2 and 5+6+9-0=20 so 2nd term is between 5 and 25.
216 has factors of 6,8,9,12,18,24 in those ranges, and 216 = 12 x 18.

From that we can do some directed guessing ...

12x18 seems like a good place to look.
First term of 18 means N+M+R=19 so 4,6,9 is the only triplet that works.
That leaves 12 and S,Q,A of 0,3,5, with S+Q+A-R=5.
This would require R=3 which doesn't work.

Flip it?
First term of 12 means N+M+R=13 so 0,4,9 or 3,4,6 are possible triplets.
Second term of 18 means S+Q+A-R=11.
For N,M,R from 0,4,9 we'd have 3,5,6 for S,Q,A; S+Q+A-R=11 requires R=3, doesn't work.
For N,M,R from 3,4,6 we'd have 0,5,9 for S,Q,A; S+Q+A-R=11 requires R=3, so let's go with that.

Now we can fill in what we know.

C=1, U=7, B=2, E=8, R=3, (S,Q,A) are from (0,5,9), (N,M) are from (4,6).

At this point,

if there's any way to distinguish between S,Q,A or N,M, I don't see it.
So there are 12 valid solutions:
C=1, U=7, B=2, E=8, R=3, S=0, Q=5, A=9, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=0, Q=9, A=5, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=5, Q=0, A=9, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=5, Q=9, A=0, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=9, Q=0, A=5, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=9, Q=5, A=0, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=0, Q=5, A=9, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=0, Q=9, A=5, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=5, Q=0, A=9, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=5, Q=9, A=0, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=9, Q=0, A=5, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=9, Q=5, A=0, N=6, M=4

(CUBE) = (N - U + M - B + E + R ) x (( S + Q + U + A - R )x E))
1728 = ((N+M=10)-7-2+8+3) x (S+Q+A=14)+7-3) x 8 = 12 x 18 x 8 ... yup.

Note, too, that we did this analysis for the factorization of 216=12x18.
We didn't look at 216=9x24, which gives still more valid solutions.

I had really hoped there'd be a unique solution.

• When I eventually used a computer V qvfpbirerq gurer ner zber fbyhgvbaf ohg V pnaabg fnl jul ng guvf fgntr be hfr vg va zl nafjre orpnhfr vg vf inadmissible. May 6, 2019 at 11:55

My thinking so far.

There are 10 numbers that are a 4-digit CUBE
1000
1331
1728
2179
2744
3375
4096
4913
5832
6859
8000
9261

I know the digits are all different, so this reduces the list to
1728
2179
4096
4913
5832
6859
9261

Now, the maximum value that N + M + E + R - U - B can be is 29.
And, the maximum value that S + Q + U + A - R can be is 30 (even with overlapping values).
So their maximum product is 870 and so E cannot be 1. This rules out one more value, leaving
1728
2179
4096
4913
5832
6859

The CUBE cannot be the cube of any of the three primes 13, 17, 19 because E cannot be those values, or their squares, or 1, ruling our three more. Now there are
1728
4096
5832

The second of those can be removed because E = 6 and 4096 is indivisible by 6. Now
1728
5832

Now exploring 5832, and looking for the largest product of the first two operands. The value R is added to one operand and subtracted from the other, so to maximise their product R = 0.
0 R
1
2 E
3 B
4
5 C
6
7
8 U
9

The first operand is N + M + E + R - U - B = N + M - 9, max is 9 + 7 - 9 = 7.
The second operand is S + Q + U + A - R = S + Q + A + 8, max is 6 + 4 + 1 + 8 = 19.
The third operand E = 2.
But 7 x 19 x 2 = 266 which is not large enough.

Taking them the other way around:
The second operand is S + Q + U + A - R = S + Q + A + 8, max is 9 + 7 + 6 + 8 = 30.
The first operand is N + M + E + R - U - B = N + M - 9, max is 4 + 1 - 9 = -4.
Their product is giving a negative number.

So CUBE = 1728.

It needs more number wrangling from here, covered in another answer.

Edit:

There cannot be a unique solution, because N + M in the first operand has two variants for any given solution, and S + Q + A in the second operand and has six variants.

• (You may want to look at my answer before you spend too much time numbers wrangling. You're following pretty closely in my footsteps. Great minds ...)
– Rubio
May 6, 2019 at 9:11
• @Rubio I avoided looking too closely at your answer, only enough to make sure I wasn't taking quite the same route. May 6, 2019 at 9:14

Sorting from the 4 digit cubes, we find that only possibility is 1728 ( last digit is factor of the number along with other factors being small enough to arrange as the sum of one digit numerals)

Now substitute and solve

( judgement + hit and trial),

Hence:

S=9, Q=5, A=0, N=6, M=4, R=3, C=1, U=7, B=2, E=8
There can other soultions, shuffling between (5,9,0) for (S,Q,A) and (4,6) for (M,N).