What is a combination of the numbers 1, 2, 3, 4, and 5 that yield 170, using only basic operations (+, -, *, /, ^) and the factorial (!)?

200 Views Asked by At

Rules:

  1. Only basic operations (+, -, *, /, ^) and the factorial (!) are allowed.
  2. No concatenation (i.e. 34, 12, 125, etc).
  3. Parentheses are allowed.
  4. All numbers must be used (omitting numbers is not allowed).
  5. Each number can be used only once (i.e no $2^2$ or $3+3$ or $5! * 5$ or anything like that)

Examples: $(1+2)^3 + 4! + 5! = 171$ or $(-1+2)*(3!+4!)*5 = 150 $

I know this is an oddly specific question, but I'm asking this question on behalf of someone else who is trying to make as many positive integers as possible using these rules. 170 is the only 'gap' they have on their spreadsheet at the moment, and I'd like to help them resolve it. We'd appreciate any assistance, and I apologize in advance if this question doesn't meet the guidelines of MSE.

EDIT: If it is not possible to construct a combination that yields 170, is there a way to prove it?

EDIT #2: I want to apologize. It turns out I missed a rule. It is now written below.

  1. The numbers must in ascending order. (i.e. 1 before 2, 2 before 3, etc).
2

There are 2 best solutions below

1
On

(Posted before the OP's second edit.) $$170 = 5! + ((3! \times 4) + 1)\times 2.$$

1
On

While I can't prove it for sure, empirical evidence seems to suggest that it's impossible. I have written a little brute forcing program in order to speed things up a little, and while it can almost instantly find solutions for all numbers up to 169, it gets stuck while trying to find a solution for 170.

I was curious though how well one could at least hope to approximate 170. The best solution it could find was:

-((1+2)!)!/(3/4-5) ≈ 169.4118

Now if we also allow the factorial to take any real number as an input (excluding negative integers), which we can achieve by extending its domain using the gamma function, it was able to find this:

-(-(((-((-(((-(-1/2)!)!)!)-3!)!)-4)!/5!)!)!)! ≈ 170.00000586

And here is a LaTeX version of it, to make it just a little more readable: $$ -\left(-\left(\frac{\left(-\left(\left(-\left(\left(\left(-\left(-\frac12\right)!\right)!\right)!\right)-3!\right)!\right)-4\right)!}{5!}!\right)!\right)! $$