# 1978: I’ve got to make all numbers from 1-100 using only the numbers 1, 9, 7, 8.

#### ellaer

##### New member
I’ve got to make all numbers from 1-100 using only the numbers 1, 9, 7, 8. I must use them all and only once, I can make numbers, (e.g 97 out of 9,7), they can be in any order, and I can use any operation (apart from powers not using 1978). I’ve got 37 and 38 left. Can anyone help me?

#### MarkFL

##### Super Moderator
Staff member
8×7-19=37

• Steven G and Harry_the_cat

#### Harry_the_cat

##### Elite Member
What do you mean by "apart from powers not using 1978"?
Also can you use the factorial symbol or the square root symbol?

Last edited:
• Steven G

#### Harry_the_cat

##### Elite Member
$$\displaystyle \lceil (8\div7) \rceil \times 19 = 38$$ if you are allowed to use the ceiling function.

• MarkFL

#### Mr. Bland

##### Junior Member
This question has had a particular effect on me. I made a program to work on this, in every bit as inefficient a manner as you would expect. Here's what it found...

Using only addition, subtraction, multiplication and division, it found that 45 of the 100 numbers can be computed:

1 = (7 + 9) / 8 - 1
2 = (1 * 7 + 9) / 8
3 = 1 + (7 + 9) / 8
4 = 1 * 8 / (9 - 7)
5 = 1 - 8 / (7 - 9)
6 = 1 * 7 + 8 - 9
7 = 1 + 7 + 8 - 9
8 = 1 * 7 - 8 + 9
9 = 1 + 7 - 8 + 9
10 = (1 + 7) / 8 + 9
11 = 1 - 7 + 8 + 9
12 = 8 / (7 - 1) * 9
14 = (1 - 8) * (7 - 9)
15 = 8 * (9 - 7) - 1
16 = 1 * 8 * (9 - 7)
17 = 1 - (7 - 9) * 8
18 = (1 - 7 + 8) * 9
23 = 7 - 1 + 8 + 9
24 = 1 * 7 + 8 + 9
25 = 1 + 7 + 8 + 9
36 = 8 / (1 - 7 / 9)
39 = (7 - 1) * 8 - 9
40 = 7 * (8 - 1) - 9
46 = (7 - 1) * 9 - 8
47 = 1 * 7 * 8 - 9
48 = 1 + 7 * 8 - 9
54 = (1 + 8) * 7 - 9
55 = (1 + 7) * 8 - 9
56 = 1 + 7 * 9 - 8
57 = (7 - 1) * 8 + 9
58 = 7 - 8 * 1 + 9
62 = (1 + 9) * 7 - 8
64 = (1 + 7) * 9 - 8
65 = 1 * 7 * 8 + 9
66 = 1 - 7 + 8 * 9
70 = 7 - (1 - 8) * 9
71 = 1 * 7 * 9 + 8
72 = 1 + 7 * 9 + 8
73 = (1 + 7) * 8 + 9
74 = (1 + 8) * 9 - 7
78 = (1 + 9) * 7 + 8
79 = 1 * 7 + 8 * 9
80 = 1 + 7 + 8 * 9
87 = (1 + 9) * 8 + 7
88 = (1 + 8) * 9 + 7

By allowing negation, there were no new results. I guess that makes sense, considering that just winds up multiplying by a difference in reverse order. There's probably some deeper meaning to this that I can't be bothered to dig into.

Combining two sets of digits into a single number, such as taking 1 and 8 to make 18, is called concatenation. Allowing concatenation reaches another 29 answers:

13 = 91 - 78
19 = 19 * (8 - 7)
20 = 18 - 7 + 9
21 = 8 + 91 / 7
27 = 189 / 7
34 = 17 + 8 + 9
35 = 91 - 7 * 8
37 = 7 * 8 - 19
45 = 7 * 9 - 18
59 = 78 - 19
61 = 79 - 18
63 = (18 - 9) * 7
68 = 78 - 1 - 9
69 = 1 * 78 - 9
75 = 19 + 7 * 8
76 = 91 - 7 - 8
77 = (19 - 8) * 7
81 = (17 - 8) * 9
82 = 1 * 89 - 7
83 = 1 - 7 + 89
86 = 78 - 1 + 9
89 = 17 + 8 * 9
90 = 1 - 8 + 97
91 = 1 * 98 - 7
92 = 1 - 7 + 98
95 = 7 - 1 + 89
96 = 1 * 7 + 89
97 = 1 + 7 + 89
99 = (18 - 7) * 9

Rounding functions were suggested, such as ceiling (round up) and floor (round down). By allowing these, another 9 answers are captured:

22 = ⌊179 / 8⌋
28 = ⌊198 / 7⌋
29 = ⌈198 / 7⌉
38 = 19 * ⌈8 / 7⌉
41 = ⌈(81 - 9) / 7⌉
49 = 7 * ⌊8 - 1 / 9⌋
84 = 7 * ⌈91 / 8⌉
93 = ⌈8 / 7 + 91⌉
98 = ⌊ 1 / 7 + 98⌋

But this doesn't get us all the way there. I was thinking of other potential simple operations and decided to give square root a try. This gives us another 16 answers:

26 = 1 * 78 / √9
30 = (1 - 7) * (√9 - 8)
31 = 1 * 7 + 8 * √9
32 = 1 + 7 + 8 * √9
33 = 1 + √(7 + 9) * 8
42 = 18 * 7 / √9
43 = 17 * √9 - 8
44 = (7 + 8) * √9 - 1
51 = 7 - 1 + 8 * √9
52 = 7 * 8 - 1 - √9
53 = 1 * 7 * 8 - √9
60 = 1 + 7 * 8 + √9
67 = (1 + 7) * 8 + √9
85 = 17 * (8 - √9)
94 = 97 - √(1 + 8)
100 = √(1 + 8) + 97

In total, with these operations, we're up to, um... 99 answers. So close! Only 50 remains, and it curiously can't be formed from any combination of the operations explored so far.

For each unary operation in the mix, my software takes exponentially long to compute (it can attach any combination of them to all numbers and binary operations), so I was really pushing my luck by allowing square root and ceiling/floor to play together... But it gave me this:

50 = ⌊(√(1 + 7) + √8) * 9⌋

So I guess that's the full set. Not sure how I feel about letting ceiling and floor participate, since that along with the likes of remainder division always felt a bit destructive to me. I'm also not a fan of using square root since in essence it's just raising to the power of [imath]\frac{1}{2}[/imath], and exponents are apparently not allowed.

• BigBeachBanana

#### mmm4444bot

##### Super Moderator
I’ve got to make all numbers from 1-100 using only the numbers 1, 9, 7, 8.
Is this homework?
[imath]\;[/imath]

#### Dr.Peterson

##### Elite Member
(apart from powers not using 1978)
I assume this means you can use exponents, but only when you explicitly use the allowed digits. That is, the exponent must be one of the four digits, as in 8^(9-7)-1 = 63, or 1^7+8+9-18, not something squared, using a 2 as the exponent. (Not that I expect that to be very useful.)

This would probably also apply to roots, except that the index 2 doesn't have to be shown for a square root.

How did you make, say, 41?

How about using factorials, as in 9!/7!+1+8 = 81?

Or decimals, as in 18/.9+7 = 27?
So I guess that's the full set. Not sure how I feel about letting ceiling and floor participate, since that along with the likes of remainder division always felt a bit destructive to me. I'm also not a fan of using square root since in essence it's just raising to the power of [imath]\frac{1}{2}[/imath], and exponents are apparently not allowed.
I very much dislike using floor and ceiling in these; did you try using square root without them, to get everything? I think it is standard to allow it.

#### Mr. Bland

##### Junior Member
I very much dislike using floor and ceiling in these; did you try using square root without them, to get everything?

I did, yeah. Square root failed to account for 38, 49, 93 and 98, which were all matched by floors and ceilings. 50 required the use of both square root and floor.

Allowing exponentiation fares much better: every number except 38, 50 and 93 turns up this way, without ceiling or floor. Please excuse the reverse Polish notation below: it's late and I don't feel like formatting them all at the moment.

1 = 1 7 + 8 + sqrt 9 sqrt -
2 = 1 7 + 8 / 9 sqrt + sqrt
3 = 1 7 + 8 - 9 + sqrt
4 = 1 7 + 8 / 9 sqrt +
5 = 1 7 + 8 + 9 + sqrt
6 = 1 7 + 8 + sqrt 9 * sqrt
7 = 1 7 + 8 + sqrt 9 sqrt +
8 = 1 7 + 8 + sqrt 9 sqrt ^ sqrt
9 = 1 7 + 8 - 9 +
10 = 1 7 + 8 / 9 +
11 = 1 7 + 8 * sqrt 9 sqrt +
12 = 1 7 + 8 + 9 * sqrt
13 = 1 7 + 8 + sqrt 9 +
14 = 1 7 concat 8 + sqrt 9 +
15 = 1 7 concat 8 + 9 * sqrt
16 = 1 7 sqrt * sqrt 8 ^ sqrt 9 +
17 = 1 7 + 8 * sqrt 9 +
18 = 1 7 - 8 + 9 *
19 = 1 7 + 8 + 9 sqrt +
20 = 1 8 concat 7 - 9 +
21 = 1 7 * sqrt 8 ^ sqrt 9 * sqrt
22 = 1 7 concat 8 + 9 sqrt -
23 = 1 7 concat 8 9 sqrt ^ + sqrt
24 = 1 7 + 8 * 9 * sqrt
25 = 1 7 + 8 + 9 +
26 = 1 7 8 concat * 9 sqrt /
27 = 1 7 ^ 8 + 9 sqrt *
28 = 1 7 concat 8 + 9 sqrt +
29 = 1 7 * 9 sqrt * 8 +
30 = 1 7 - 9 sqrt 8 - *
31 = 1 7 * 8 9 sqrt * +
32 = 1 7 + 8 9 sqrt * +
33 = 1 7 9 + sqrt 8 * +
34 = 1 7 concat 8 + 9 +
35 = 1 7 * 8 9 sqrt - *
36 = 1 7 + 8 + sqrt 9 *
37 = 7 8 * 1 9 concat -
38
39 = 1 8 concat 7 9 sqrt * +
40 = 1 7 + 8 9 sqrt - *
41 = 1 7 concat 8 9 sqrt * +
42 = 1 8 concat 7 * 9 sqrt /
43 = 1 7 concat 9 sqrt * 8 -
44 = 7 8 + 9 sqrt * 1 -
45 = 1 7 * 8 + 9 sqrt *
46 = 1 7 8 ^ sqrt * sqrt 9 sqrt -
47 = 1 7 * 8 * 9 -
48 = 1 7 + 8 + 9 sqrt *
49 = 1 8 - 7 9 + sqrt ^ sqrt
50
51 = 1 7 concat sqrt 8 ^ sqrt 9 * sqrt
52 = 1 7 8 ^ sqrt * sqrt 9 sqrt +
53 = 1 7 * 8 * 9 sqrt -
54 = 1 7 8 * + 9 sqrt -
55 = 1 7 + 8 * 9 -
56 = 1 7 9 * + 8 -
57 = 1 9 ^ 7 8 * +
58 = 1 7 8 ^ sqrt * sqrt 9 +
59 = 1 7 * 8 * 9 sqrt +
60 = 1 7 8 * + 9 sqrt +
61 = 1 7 + 8 * 9 sqrt -
62 = 1 9 + 7 * 8 -
63 = 1 7 sqrt 9 sqrt * sqrt * sqrt 8 ^
64 = 1 7 + 8 + 9 sqrt ^ sqrt
65 = 1 7 * 8 * 9 +
66 = 1 7 - 8 9 * +
67 = 1 7 + 8 * 9 sqrt +
68 = 1 9 concat 7 sqrt 8 ^ sqrt +
69 = 1 7 8 concat * 9 -
70 = 1 7 8 concat + 9 -
71 = 1 7 * 9 * 8 +
72 = 1 7 + 8 * sqrt 9 *
73 = 1 7 + 8 * 9 +
74 = 1 8 + 9 * 7 -
75 = 1 7 concat 8 + 9 sqrt *
76 = 1 7 8 concat + 9 sqrt -
77 = 1 7 * 8 9 sqrt + *
78 = 1 7 8 9 sqrt + * +
79 = 1 7 * 8 9 * +
80 = 1 7 + 8 9 * +
81 = 1 7 ^ 8 + 9 *
82 = 1 7 8 concat + 9 sqrt +
83 = 1 7 - 8 9 concat +
84 = 1 8 7 concat * 9 sqrt -
85 = 1 7 concat 8 9 sqrt - *
86 = 7 8 concat 1 - 9 +
87 = 1 7 8 concat * 9 +
88 = 1 7 + 8 9 sqrt + *
89 = 1 7 ^ 8 9 concat *
90 = 1 7 ^ 8 9 concat +
91 = 1 8 7 concat + 9 sqrt +
92 = 1 7 - 9 8 concat +
93
94 = 9 7 concat 1 8 + sqrt -
95 = 7 1 - 8 9 concat +
96 = 1 7 * 8 9 concat +
97 = 1 7 + 8 9 concat +
98 = 1 7 ^ 9 8 concat *
99 = 1 7 ^ 9 8 concat +
100 = 1 7 9 sqrt + 8 ^ sqrt * sqrt

Some of these are rather mesmerizing, like the one it found for 63.

Allowing nᵗʰ roots gives a clever answer for 50 that looks kinda scary but is actually quite elegant:

[imath]50=1+7^{\sqrt[\sqrt{9}]{8}}[/imath]

38 and 93 are still left out in the cold, though. I'm open to suggestions for how one might work them out without rounding.

Factorial might be tricky to implement because it can produce numbers that are far too large to compute conventionally.

Allowing remainder division gives exactly one answer for 38:

[imath]38 = 8^9 mod 71[/imath]

Once again, I don't really like destructive integer-based operations (partly because of traumas incurred while studying primes).

• Cubist

#### Agthodoth

##### New member
What do you mean by "apart from powers not using 1978"?

#### Dr.Peterson

##### Elite Member
What do you mean by "apart from powers not using 1978"?
Did you not read what I said (in the absence of a reply from the OP to #3, which asked the same question)?
I assume this means you can use exponents, but only when you explicitly use the allowed digits. That is, the exponent must be one of the four digits, as in 8^(9-7)-1 = 63, or 1^7+8+9-18, not something squared, using a 2 as the exponent. (Not that I expect that to be very useful.)
I am taking "using 1978" as "using any of 1, 9, 7, 8".

Otherwise, your guess is as good as mine.

#### lookagain

##### Elite Member
That is, the exponent must be one of the four digits, /... / or 1^7 + 8 + 9 - 18, ...
. . .
I am taking "using 1978" as "using any of 1, 9, 7, 8".

ellaer's first post: "…using only the numbers 1, 9, 7, 8. I must use them all and only once…"