# Secret Code Puzzle

#### Farmtalk

##### Active member
I posted this on my website a couple days ago. I like puzzles a lot, so I figured I would share it here and see how many people could figure it out; enjoy! A man wanted to get into his work building, but he had forgotten his code. However, he did remember five clues. These are what those clues were:

The fifth number plus the third number equals fourteen.

The fourth number is one more than the second number.

The first number is one less than twice the second number.

The second number plus the third number equals ten.

The sum of all five numbers is 30.

What were the five numbers and in what order?

#### soroban

##### Well-known member
Hello, Farmtalk!

A man wanted to get into his work building, but he had forgotten his code.
However, he did remember five clues. These are what those clues were:

 The fifth number plus the third number equals fourteen.

 The fourth number is one more than the second number.

 The first number is one less than twice the second number.

 The second number plus the third number equals ten.

 The sum of all five numbers is 30.

What were the five numbers and in what order?

Let $$a,b,c,d,e$$ . . be the five numbers, in that order.

We are given:

. . $$ \;e+c \,=\,14$$

. . $$\;d \,=\,b+1$$

. . $$\;a \,=\,2b-1$$

. . $$\;b+c \:=\:10$$

. . $$\;a+b+c+d+e \,=\,30$$

From , we have: .$$a + b + d + (e+c) \:=\:30$$

Since $$e+c\,=\,14$$ . , we have: .$$a+b+d+14 \:=\:30$$
. . Hence: .$$a+b+d \:=\:16$$

Substitute  and : .$$(2b-1) + b+ (b+1) \:=\:16$$

. . $$4b \:=\:16 \quad\Rightarrow\quad b \,=\,4$$

Substitute into : .$$a \:=\:2b-1 \quad\Rightarrow\quad a \,=\,7$$

Substitute into : .$$c \:=\:10-b \quad\Rightarrow\quad c \,=\,6$$

Substitute into : .$$d \:=\:b+1 \quad\Rightarrow\quad d \,=\,5$$

Substitute into : .$$e \:=\:14-c \quad\Rightarrow\quad e \,=\,8$$

Therefore, the code is $$74658.$$

#### Farmtalk

##### Active member
That's the number I got! CORRECT! 