Can a line be constructed that ends in any positive integer whatsoever?

In summary: Apply the procedure for the number you are looking for to the prime that precedes it. 2. Add the two numbers you generated in the previous step together. 3. Multiply the number you generated in the previous step by the prime that precedes it. 4. Take the square root of the number you generated in the previous step.
  • #1
BicycleTree
520
0
I had this idea this morning and was going to make another "figure-out-the-sequence" out of it, until it occurred to me that it was slightly more interesting than that.

Consider the following procedure: start a line with 0 2, and add on additional numbers as you please so long as the following condition is met for each additional number: label the preceding two numbers from the one you are adding on a and b (in order) and the new number must be a - b, a + b, a / b, or a * b.

Here are lines made by that procedure that end in the numbers 1-4 respectively:
0 2 2 1
(0 + 2 = 2, 2 / 2 = 1)
0 2
(no additional numbers added)
0 2 2 1 3
(0 + 2 = 3, 2 / 2 = 1, 2 + 1 = 3)
0 2 2 4
(0 + 2 = 2, 2 * 2 = 4)

I ended it here because 5 is the first one that's a little bit harder.


Puzzlers:
1. Find lines ending in numbers as high as you can (say, shoot for 20; I just did 11).

2. Given that the last number so far on a line is x, how can you append numbers so that the number -x is the last on the line?

3. Given that the last two numbers in a line are arbitrary x y, can you append numbers until the line ends in y x? (note: if the last two numbers are x y, you can append x - y but not y - x)

4. Given that the last number on a line is arbitrary x, can you append numbers until the line ends in x 1 or in 1 x?

5. Can a line be constructed that ends in any positive integer whatsoever?


I do not know the answers to 3 and 4 at present. If, in thinking about this, you come up with other puzzlers about this type of sequence, feel free to add them to the thread.
 
Last edited:
Physics news on Phys.org
  • #2
Here's some more idea of what I mean, in the form of lines ending in numbers from 1 to 9. Complete these up to 30:

0 2 2 1
0 2
0 2 2 1 3
0 2 2 4
0 2 2 1 3 -2 5 (slightly tricky)
0 2 2 4 6
0 2 2 1 3 4 7
0 2 2 4 8
0 2 2 1 3 3 9


---------------------
To be clear, this is how you can make 5:
0 2
(start of line) Now the next number can be 2 (= 0 + 2), -2 (=0 - 2), 0 (=0 * 2), or 0 (= 0 / 2). In this case I chose 2.
0 2 2
Now the next number can be 4 (= 2 + 2), 0 (= 2 - 2), 4 (= 2 * 2), or 1 (= 2 / 2). In this case I chose 1.
0 2 2 1
Now the next number can be 3 (= 2 + 1), 1 (= 2 - 1), 2 (= 2 * 1), or 2 (= 2 / 1). In this case I chose 3.
0 2 2 1 3
Now the next number can be 4 (= 1 + 3), -2 (= 1 - 3), 3 (= 1 * 3), or 1/3 (= 1 / 3). In this case I chose -2.
0 2 2 1 3 -2
Now the next number can be 1 (= 3 + (-2)), 5 (= 3 - (-2)), -6 (= 3 * (-2)), or -1.5 (= 3 / (-2)). In this case I chose 5.
0 2 2 1 3 -2 5
 
Last edited:
  • #3
Thanks for the clarification bicycletree. I've gotten pretty high numbers, obviously, there isn't a limit to the series. Those number with a lot of factors are particularly easy. I can't seem to get any of the higher primes(like 17, 31, 53, etc.). I can also get quite a large number of fractions. I'm still working on it though. :frown:
 
  • #4
Well, any integer can be constructed--in fact I figured out a general method that will do so, although the line it makes for a given number n is somewhat longer than n is large. Doing 17 (without that method) was a little tricky:
0 2 2 1 3 4 7 11 -4 7 3 10 -7 17

You can get 31 from 17:
0 2 2 1 3 4 7 11 -4 7 3 10 -7 17 -24 -7 -31 22 -7 31

And you can get 53 from 31:
0 2 2 1 3 4 7 11 -4 7 3 10 -7 17 -24 -7 -31 22 -7 31 22 53
 
Last edited:
  • #5
I have 4 procedures for negating a number. Here's one of them, the second one I discovered:

a b (a+b) (a+2b) -b

What are the other 3?
 
  • #6
I did some more thinking about this last night and discovered that yes, it is possible to create a line ending in x 1 or 1 x from a line ending in x.

So the only question of the original five that I don't know the answer to is whether you can create a line ending in y x from a line ending in x y. My feeling at the moment is no; in fact, I know that you can't do it in a straightforward manner using addition and subtraction only. Looking at each new appended number algebraically as (nx+my), you can't get y x explicitly. Puzzle: how do you prove that?

Also, here is an additional question: can you create any rational number whatsoever? Or, more broadly, can you create a line ending in any two integers whatsoever?
 
  • #7
Getting 20:
0 2
0 2 2 +
0 2 2 1 /
0 2 2 1 3 +
0 2 2 1 3 4 +
0 2 2 1 3 4 12 x
0 2 2 1 3 4 12 16 +
0 2 2 1 3 4 12 16 -4 -
0 2 2 1 3 4 12 16 -4 20 -
 
  • #8
BicycleTree said:
I have 4 procedures for negating a number. Here's one of them, the second one I discovered:

a b (a+b) (a+2b) -b

What are the other 3?

(+, +, -) a b a+b a+2b -b
(-, +, -) a b a-b a -b
(*, +, -) a b ab b+ab -b
(/, +, -) a b a/b b+a/b -b

(*, /, *, +, +, -) a b ab 1/a b (1/a)+b (1/a)+2b -b
(*, /, *, -, +, -) a b ab 1/a b (1/a)-b 1/a -b
(*, /, *, *, +, -) a b ab 1/a b b/a b+b/a -b
(*, /, *, /, +, -) a b ab 1/a b 1/(ab) b+1/(ab) -b

(/, /, *, *, +, +, -) a b a/b bb/a b b+bb/a 2b+bb/a -b
(/, /, *, *, -, +, -) a b a/b bb/a b b-b/a 2b-b/a -b
(/, /, *, *, *, +, -) a b a/b bb/a b bbb/a b+bbb/a -b
(/, /, *, *, /, +, -) a b a/b bb/a b b/a b+b/a -b


(*, *, /, *, *, -, +, -, /) a b ab abb 1/b ab a ab-a ab -a -b

 
  • #9
Yep, Gerben--the first four of those are what I had in mind. The next eight are just variations on the first four (you just did some operations to get b again, and then applied one of the first four) but the last one is interesting.

Here's my sequence for all the integers:
+ + - - - + + + - ...
a b a+b a+2b -b a+3b -a-4b -b -a-5b -a-6b b ...
When a = 0 and b = 1, which you can get from 0 2 2 1 1 0 1, this creates every integer or the negation of that integer. Although it does take a long time for larger integers. Anyone know a shorter way (besides brute force)?
 
  • #10
I have figured out the remaining puzzles. So here is the remaining list of questions, which I have the answer to:

1. Given that the last two numbers in a line are arbitrary x y, can you append numbers until the line ends in y x? (note: if the last two numbers are x y, you can append x - y but not y - x) (yes)

2. Given that the last number on a line is arbitrary x, can you append numbers until the line ends in x 1 or in 1 x? (yes)

3. Can a line be constructed that ends in any positive integer whatsoever? (yes--I have answered this one though a quicker answer may exist, and it's necessary in order to solve the other questions)

4. Can any rational number be constructed? (yes)

5. Can a line be constructed that ends in any two integers whatsoever? (yes)

6. Given that a line ends in x y, does there exist a single sequence of operations involving only addition and subtraction that can always be applied to make the line end in y x? (no)

And here is a puzzle I have not solved:
7. Given that a line ends in x y, does there exist a single sequence of operations that can always be applied to make the line end in y x?
 
  • #11
Trivial answer:

0 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1

0+2
2/2
2/1
1*2
2/2
2/1
1*2
...repeat
 

What is a procedure sequence puzzle?

A procedure sequence puzzle is a type of logic puzzle where the goal is to determine the correct order of a set of steps or procedures based on given clues or information.

How do you solve a procedure sequence puzzle?

The first step in solving a procedure sequence puzzle is to carefully read and analyze the given clues or information. Then, you can start to make educated guesses and use the process of elimination to determine the correct order of the steps.

What skills are needed to solve a procedure sequence puzzle?

Solving a procedure sequence puzzle requires critical thinking, problem-solving, and deductive reasoning skills. It also helps to have a good memory and the ability to keep track of multiple variables and possibilities.

Are there different types of procedure sequence puzzles?

Yes, there are different types of procedure sequence puzzles, such as number sequence puzzles, letter sequence puzzles, and logic puzzles. Each type may have its own set of rules and variations, but the basic goal remains the same.

Can procedure sequence puzzles be used in real-world applications?

Yes, procedure sequence puzzles are often used in educational settings to develop critical thinking skills. They can also be used in job interviews to assess a candidate's problem-solving abilities. In addition, many real-world tasks, such as following a recipe or assembling furniture, can be seen as a type of procedure sequence puzzle.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
19
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
992
  • Precalculus Mathematics Homework Help
Replies
14
Views
272
  • Calculus and Beyond Homework Help
Replies
2
Views
391
  • Calculus and Beyond Homework Help
Replies
1
Views
132
  • Precalculus Mathematics Homework Help
Replies
5
Views
929
  • General Discussion
2
Replies
43
Views
4K
Replies
4
Views
218
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top