Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers.

- katastrofa
**Posts:**9438**Joined:****Location:**Alpha Centauri

You'll need (), too...

"**Write 24** using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers."

AI solutions allowed?:

AI solutions allowed?:

Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers.

Code: Select all

```
int main()
{
int a, b, c, d, answer;
a = 1;
b = 3;
c = 4;
d = 6;
answer = a/b + c*d;
printf("The answer is %d\n",answer);
}
// output: The answer is 24
```

It does say “write.”"Write 24using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers."

AI solutions allowed?:

Screen Shot 2019-06-15 at 3.32.51 PM.png

- katastrofa
**Posts:**9438**Joined:****Location:**Alpha Centauri

You need "(" and ")", too...

I couldn't figure it out, I am sure it involves some clever use of distributivity...

At first, I decided to factor 24 into prime factors 2*2*2*3 = a*a*a*b = (a^3)*b (note in this case (a^3)*b = 2*(a^2)*b = (a^2 + a^2)*b

Listing out the numbers we have:

1 = e (multiplicative identity)

3 = b

4 = 2*2 = a^2 (note in this case a^2 = 2*a = a + a)

6 = a*b

I tried various different combinations but with no avail.

None of this really proves or disproves anything but maybe a step in the right direction?

At first, I decided to factor 24 into prime factors 2*2*2*3 = a*a*a*b = (a^3)*b (note in this case (a^3)*b = 2*(a^2)*b = (a^2 + a^2)*b

Listing out the numbers we have:

1 = e (multiplicative identity)

3 = b

4 = 2*2 = a^2 (note in this case a^2 = 2*a = a + a)

6 = a*b

I tried various different combinations but with no avail.

None of this really proves or disproves anything but maybe a step in the right direction?

- katastrofa
**Posts:**9438**Joined:****Location:**Alpha Centauri

You need to use Deep Neural Networks.

In Mathematica:

StringJoin[ToString[1*6/3], ToString[4]]

24

StringJoin[ToString[1*6/3], ToString[4]]

24

- Cuchulainn
**Posts:**62596**Joined:****Location:**Amsterdam-
**Contact:**

I would have concerns about the run-time efficiency. Do the strings use hashing?In Mathematica:

StringJoin[ToString[1*6/3], ToString[4]]

24

Step over the gap, not into it. Watch the space between platform and train.

http://www.datasimfinancial.com

http://www.datasim.nl

http://www.datasimfinancial.com

http://www.datasim.nl

I would have concerns about the run-time efficiency. Do the strings use hashing?In Mathematica:

StringJoin[ToString[1*6/3], ToString[4]]

24

answer = StringJoin[ToString[1*6/3], ToString[4]];

Hash[answer, "SHA256"]

87843000942654739416790862908851944946087349408853794374923081877917692795355

Hash["24", "SHA256"]

87843000942654739416790862908851944946087349408853794374923081877917692795355

Hash[answer, "SHA256"] == Hash["24", "SHA256"]

True

- Cuchulainn
**Posts:**62596**Joined:****Location:**Amsterdam-
**Contact:**

What about a least-squares optimisation problem?Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers.

24 is a highly composite number, just like 5040. Coincidence?

Last edited by Cuchulainn on June 19th, 2019, 8:45 am, edited 1 time in total.

Step over the gap, not into it. Watch the space between platform and train.

http://www.datasimfinancial.com

http://www.datasim.nl

http://www.datasimfinancial.com

http://www.datasim.nl

GZIP: On