# Peculiar Numbers [closed]

Apart from the regular numbers, now we will reform the numbers and call them peculiar numbers. We will consider the numbers in range of [1-9].

This is how the peculiar numbers are different from regular numbers.

• Every peculiar number is processed in this way;

• x is any number and it's peculiar form is ( x + x - x * x )^x (You take care of operation priority)

Now the problem is how to reshape the operations so that results become same as in regular numbers.

Example:

• 3 + 2 = 5
• Peculiar(3) + Peculiar(2) must be 5
• Here, we have to reform the + so that the peculiar operation gives 5 again.

But here we have to think about all numbers between [1-9] and these operations +, -, x, /. An example solution will be like;

The new form of addition sign is like

• a + b = a^b + b*a - b
• not Peculiar(5)? – JMP Mar 3 '18 at 8:56
• did you prove by putting values? I do not know the answer – InaccurateWeatherReport Mar 3 '18 at 9:01
• are we going for Peculiar(2)+Peculiar(3)=Peculiar(5) or Peculiar(2)+Peculiar(3)=5? the first looks more interesting... – JMP Mar 3 '18 at 9:10
• it will result same as in regular numbers so answer will be 5 not peculiar(5) – InaccurateWeatherReport Mar 3 '18 at 9:13
• Do you actually have an answer for this? I ask because I see no reason for any explicit expression for these operators to exist (except for stupid polynomial constructions that are essentially the same as a table look-up). – Jaap Scherphuis Mar 3 '18 at 10:32

I'll use $p_1$ to $p_9$ to mean the values Peculiar(1) to Peculiar(9).

Consider the following function:

$$D_k(x) = \prod_{i\neq k} \frac{x-p_i}{i-p_i}$$

So for example

$$D_2(x) = \frac{(x-p_1)(x-p_3)(x-p_4)(x-p_5)(x-p_6)(x-p_7)(x-p_8)(x-p_9)}{(2-p_1)(2-p_3)(2-p_4)(2-p_5)(2-p_6)(2-p_7)(2-p_8)(2-p_9)}$$

This function is constructed such that

$$D_k(p_i) = \begin{cases} 1, & i = k \\ 0, & i \ne k \end{cases}$$

You can now construct any peculiar operator as follows.

$$a+_{peculiar}b = \sum_{i=1}^9 \sum_{j=1}^9 D_i(a)\cdot D_j(b)\cdot(i+j)\\ a\times_{peculiar}b = \sum_{i=1}^9 \sum_{j=1}^9 D_i(a)\cdot D_j(b)\cdot(i\cdot j)$$

etc.

For any peculiar numbers $a$ and $b$, only one of the terms in the double sum is non-zero, and it contributes exactly the value that you want the operator to have for those $a$ and $b$. It is basically a glorified look-up table encoded into a complicated expression. This does not use any particular properties of the peculiar numbers except for the fact that they are all distinct.

Let's denote the set of peculiar numbers $P = \{ (2n-n^2)^n : n \in \{ 1,2, \dots ,9 \} \}$
Our goal is to define functions:
$$+_P:P^2 \to \mathbb{N}$$ $$-_P:P^2 \to \mathbb{N}$$ $$\cdot_P:P^2 \to \mathbb{N}$$ $$/_P:P^2 \to \mathbb{N}$$

We're working in finite space, so we can define a function by values
$dp: P \to \mathbb{N}$
$$dp(a) = \begin{cases} 1, & a = 1 \\ 2, & a = 0 \\ 3, & a = -27 \\ \vdots \\ 9, & a = 28179280429056 \end{cases}$$

Then it's very easy to define required functions (note that operators on the left hand side are from $P$, while the ones on the right are standard operators in $\mathbb{N}$
$$p +_P q = dp(p) + dp(q)$$
$$p -_P q = dp(p) - dp(q)$$
$$p \cdot_P q = dp(p) \cdot dp(q)$$
$$p /_P q = dp(p) / dp(q)$$