Creating a number using a combination of two numbers

AI Thread Summary
The discussion centers on a mathematical puzzle regarding the highest number that cannot be formed by adding any combination of the numbers 4 and 9, with the answer identified as 23. The formula for determining this number, when two numbers have no greatest common factor (GCF), is expressed as N = XY - X - Y. Participants clarify the derivation of this formula and how to apply it to check if a specific number, such as 12345, can be represented as a combination of the two numbers. The conversation also touches on solving linear congruences to find integer solutions for the combinations. Overall, the thread provides insights into both the theoretical and practical aspects of the problem.
musicgold
Messages
303
Reaction score
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
(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"?
 
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?
 
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.
 
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.
 
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.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top