Creating a number using a combination of two numbers

In summary, to create a number using a combination of two numbers, basic mathematical operations such as addition, subtraction, multiplication, and division can be used. Decimals and fractions can also be used, as there is no limit to the numbers that can be used. Negative numbers can also be used, but it is important to follow the rules of the mathematical operation being used. Multiple numbers can also be used, as long as the rules of the operation are followed.
  • #1
musicgold
304
19
Hi,

My question is related to the following puzzle.

“What is the highest number that can’t be created by adding any number of 4s and 9s”?
For example, 25 can be created as follows: 9 + 4 + 4 + 4 + 4 =25

I know that the answer is 23. I also know that the general solution to such a problem, using the numbers X and Y is (X*Y) – X – Y, when X and Y don’t have a GCF. If they have a GCF then, any number that is not divisible by the CGF can not be made using X and Y.

I have two questions.

Q1. How can I derive this formula from scratch : (X*Y) – X – Y ?

Q2. If I am given a number 12345 to figure if it can be created using X and Y, what is the quickest way to do that?


Thanks.
 
Mathematics news on Phys.org
  • #2
(X*Y)- X- Y is NOT a formula. A formula would be saying that is equal to something.

What you mean by "created using X and Y"?

Do you mean "find the largest number, N, that cannot be written in the form "XY- X- Y= N"?
 
  • #3
HallsofIvy said:
(X*Y)- X- Y is NOT a formula. A formula would be saying that is equal to something.

What you mean by "created using X and Y"?

Do you mean "find the largest number, N, that cannot be written in the form "XY- X- Y= N"?

I believe the question statement is actually, "What is the largest number, N, that cannot be made out of additions of any number of X's and Y's?", and the OP states that the answer is given by N = XY - X - Y, when X and Y have no GCF.

The OP's first question is then, how does one derive that N = XY-X-Y?

The second question is, "Given a number M and numbers X and Y, how can one figure out how to write M = aX + bY, with a and b integers, assuming a solution exists?"

Is that interpretation correct, musicgold?
 
  • #4
To solve for 12345, re-arrange your formula to

(AX-M)/Y=-B

In this form, iy's a Linear Congruence, so you can use the Modular Inverse
of X&Y to find A as follows:

A = invert(X,Y)*M (mod Y) = 1*12345%4 = 1

then solve fo B: (1*9-12345)/4=-B
-3084 = -B
B = 3084Be careful, though. You CAN actually solve f0r 23, but you get A=3,B=-1.
 
  • #5
Mute said:
The OP's first question is then, how does one derive that N = XY-X-Y?

The second question is, "Given a number M and numbers X and Y, how can one figure out how to write M = aX + bY, with a and b integers, assuming a solution exists?"

Is that interpretation correct, musicgold?

That is correct. Thanks.
 
  • #6
Oh, I forgot to mentio: if you don't like A=1, pick another.
In a linear congruence, if A is a solution, so is A+Y,
or A+nY, for that matter. So we can chose any A, as
long as it's a multiple of four plus one.

For instance, we can pick A=1001 and recalculate B
(B=834), giving us: 1001*9 +834*4=12345.
 

FAQ: Creating a number using a combination of two numbers

1. How do I create a number using a combination of two numbers?

To create a number using a combination of two numbers, you can use basic mathematical operations such as addition, subtraction, multiplication, and division. For example, if you have the numbers 2 and 3, you can create the number 5 by adding them together (2+3=5) or by multiplying them (2x3=6).

2. Can I use decimals or fractions to create a number?

Yes, you can use decimals or fractions to create a number using a combination of two numbers. Just remember to follow the rules of the mathematical operation you are using. For example, if you are using division, the answer will be a decimal or fraction.

3. Is there a limit to the numbers I can use to create a number?

No, there is no limit to the numbers you can use to create a number using a combination of two numbers. You can use any whole number, decimal, or fraction. However, some mathematical operations may result in very large or small numbers, so it's important to use caution and double check your calculations.

4. Can I use more than two numbers to create a number?

Yes, you can use more than two numbers to create a number. You can use as many numbers as you like, as long as you follow the rules of the mathematical operation you are using. For example, if you are using addition, you can add three or more numbers together to create a new number.

5. Can I use negative numbers to create a number?

Yes, you can use negative numbers to create a number using a combination of two numbers. Just remember to follow the rules of the mathematical operation you are using. For example, if you are using subtraction, the answer may be a negative number.

Similar threads

Replies
24
Views
2K
Replies
1
Views
2K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
1
Views
1K
Replies
1
Views
2K
Replies
19
Views
3K
Back
Top