# Rendering the number 10,958 with the string 1 2 3 4 5 6 7 8 9

Brazilian mathematician Inder Taneja has found a way of expressing every number between 1 and 11,111, except 10,958, by inserting mathematical operators in between the numbers 1 2 3 4 5 6 7 8 9 and evaluating the expression. He did so using the four basic arithmetic operations, exponentiation, concatenation, and brackets, but avoiding factorials, square roots, and decimals. If these last three operations are allowed, can 10,958 be likewise expressed?

• Do the digits 1 2 3 4 5 6 7 8 9 have to be in order? – Rand al'Thor Jan 12 '17 at 22:10
• Yes, they have to be in order. – Bernardo Recamán Santos Jan 12 '17 at 22:11
• Link to Taneja's paper for those who are interested in all the other numbers: arxiv.org/pdf/1302.1479v5.pdf – FrodCube Jan 12 '17 at 22:30
• This is a "decreasing" solution: 9 8 7.... 1 rather than increasing. – Bernardo Recamán Santos Jan 13 '17 at 12:48
• @Bernardi Yes, I deleted my comment when I saw it – Asoub Jan 13 '17 at 12:51

Taking from

$(1 + 2 + 34) \times (5 × 6 + 7) \times 8 + 9 = 10961$

We have

$(1 + 2 + 34) \times (5 × 6 + 7) \times 8 + (\sqrt{9})! = 10958$

• Ha! I hadn't even thought of looking at the other solutions and finding one I could tweak! Here I was racking my brain from scratch! :) Nice one! +1 – wildBillMunson Jan 13 '17 at 7:06
• +1 for the attempt. But don't you need to have an operator in between each number i.e you are using 34 directly? – thepace Jan 13 '17 at 8:28
• Going by the OP, concatenation is allowed. – Pokemon Jan 13 '17 at 9:09
• The solution uses both square roots and factorials, so it's not quite in the spirit of the paper. – Dave Jarvis Apr 26 '17 at 4:13

Voila! With arithmetic operators, factorial and exponents:

$\mathbf{{(1+2^3)}^4 + 5 - 6! + 7! + (8 \times 9 )} = {(1+8)}^4 + 5 - 720 + 5040 + 72 = 6561 + 4397 = 10958$

• A great answer using no square roots and concatenation. Good Job. – Pokemon Jan 13 '17 at 10:14
• The brackets around $(8 \times 9)$ are totally unecessary. – ibrahim mahrir Dec 21 '17 at 4:49

This is as close as I can get:

(1+2)3+4 * 5 + (6 * 7) - 8 - 9 = 10960.

Maybe this will give someone an idea of how to get there!

Concatenation is ||

1 x 23 + ((4x5x6)||7 + 8) x 9

• This checks out. QUESTION: Am I misreading the OP or does this solution satisfy the Taneja requirements without adding extra operators? since concatenation was allowed to begin with. – PatrickT Oct 21 '17 at 13:36

Matt Parker from the Numberphile YouTube channel found a solution and explains it in this video.

|| stands for concatenation. (ie: 1||0 x 2 = 20)

1 x 23 + ((4x5x6)||7 + 8) x 9

Concatenation is heavily used in the paper but I don't think it ever have been used that way. (ie:(2 x 3) || 2 = 62)

Does it's stand with the spirit of the paper? It's debatable.