BT.. Eat your heart out
Problem
My phone number has seven digits: if the last four digits are placed in front of the remaining three you get one more than twice my number! What is the number?
Getting Started
The original number is $10000x + y$. What is the new number in terms of $x$ and $y$? Use the information to write down a Diophantine equation.
(The article on Euclid's Algorithm might help with this problem.)
Student Solutions
Two excellent solutions follow, one from Elizabeth Whitmore of Madras College, St Andrew's, which uses Euclid's algorithm and the other, which uses a computer program, from Serguey and Ilya from the International School of The Hague. First Serguey and Ilya's solution.
Let $x$ be the three digit number at the start.
Let $y$ be the four digit number at the end of the phone number.
The original phone number is $10000x + y$. The changed phone number is $1000y + x$.
The new number is one more than the old number doubled so $$20000x + 2y + 1 = 1000y + x$$ $$19999x + 1 = 998y.$$ There are an infinite number of solutions to this equation.
We wrote the following program to test integer solutions:
Module1 - 1
Sub bbbbbbb ()
y = 2004
For x = 100 to 999
y = (19999 * x + 1) / 998
If y = Int(y) Then Debug.Print x; y
Next x
End Sub
The answer is: 435 8717
Elizabeth solved this equation $$998y-19999x = 1$$ using Euclid's
algorithm, as follows:
Working backwards to get values for $x$ and $y$: