Guest Posted December 19, 2009 Report Share Posted December 19, 2009 Let us say a number is "balanced" if it is a positive integer and its digit sum is equal to its digit product. 1a) Find all the two-digit balanced numbers. 1b) Prove that you found them all. 2a) Find all the three-digit balanced numbers. 2b) Prove that you found them all. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted December 19, 2009 Report Share Posted December 19, 2009 1a) 22 1b) 4 is the only sum and product that shares the same digits. 2a) 123, 132, 213, 231, 312, 321 2b) Again only one number shares a sum of digits and a product of digits, 6. There are more solutions because all the digits, 1,2, and 3, are unique and they make up 6 combinations. Bonus) The 4 digit number total to 8 and consist of all the permutations of 1,1,2,4 and there are 12 of them. Quote Link to comment Share on other sites More sharing options...
0 unreality Posted December 19, 2009 Report Share Posted December 19, 2009 Let us say a number is "balanced" if it is a positive integer and its digit sum is equal to its digit product. 1a) Find all the two-digit balanced numbers. 1b) Prove that you found them all. 2a) Find all the three-digit balanced numbers. 2b) Prove that you found them all. think of them as sets of numbers with sum/product properties; sum = product a+b = ab a = ab - b = b(a-1) a/(a-1) = b similarly a = b/(b-1) which means they both need to be numbers that can evenly divide the number one less than them. The only such integers are 0 and 2 22 00 but 00 is invalid with the conditions you gave, so 2,2 is the only equivalency set for n=2 for n=3 first, a general formula if all numbers in the set are the same for 'n' numbers, if that number is x nx = x^n n = x^(n-1) n^(1/(n-1)) = x so for n=2, x=2 for n=3, x = square root of 3 for n=4, x = cube root of 4 for n=5, x = fourth root of 5 etc. The only integer possible from that is n=2, x=2. So for n=3, integer sets of equivnums have to be different. It's easy to find CONSECUTIVE sets: x + (x+1) + (x+2) = x(x+1)(x+2) 3x + 3 = x(x+1)(x+2) 3(x+1) = x(x+1)(x+2) 3 = x(x+2) = x^2 + 2x 0 = x^2 + 2x - 3 = (x+3)(x-1) so x= -3 or x = 1 ie: -3,-2,-1 and 1,2,3 there's actually one more case. We divided out the term (x+1) so we have to check x = -1 as well: -1,0,1 that also has equal sum & product. (in fact it's easy to make them if you can have a zero in it, just do at least one zero and then some positive and negative numbers so that they cancel out for the addition part). But you want positive numbers, so 1,2,3 is the only set of CONSECUTIVE integers that fits the bill. But what about nonconsecutive... The general rule for n=2 is simple, a = b/(b-1) so a=3 and b=3/2 is such a set... 3+3/2 = 4.5 = 3 * 3/2 But for three numbers, I don't know if such a relationship exists. A long time ago I was really interested in these numbers and had like a notebook of stuff on em haha and it's somewhere but let me try... a+b+c = abc a+c = abc - b a+c = b(ac - 1) b = (a+c)/(ac-1) oh yeah that's right. I remember now. It works like this. Say you've already picked the first (n-1) numbers, and they can be anything as long as their product isnt 1. Then by adding just a single number (x) you can make the whole set equivalent of product and sum... here, 'Sum' is the sum of the first (n-1) numbers and 'Product' is their product... Sum + X = Product * X Sum = Product * X - X = X * (Product - 1) X = Sum / (Product - 1) that's the why the product cant be 1 (if it was, multiplying by X would make X but adding X would make X+1, and X cannot equal X+1) so if you had 1 and 2, the number to seal it is: (1+2) / (1*2 - 1) = 3/1 = 3 To find an integral solution for n=3, you need to find two integers whose sum divides their product minus one. For numbers above 3, it can be shown that the product is always greater than the sum. That's pretty intuitive but here's a short proof I think that would work: say you have a number, z. We want to ensure that z times z+1 is greater than z plus z+1... z(z+1) > z + (z+1) z^2 + z > 2z + 1 subtract z from both sides z^2 > z + 1 z^2 - z - 1 > 0 (z-phi)(z+1/phi) > 0 where phi is the golden ratio for that to be positive, both terms must be positive OR both terms must be negative. if both terms are positive then z - phi > 0 AND z + 1/phi > 0 -phi is lower than 1/phi, so the dominant inequality, therefore: z > phi Now if both terms are negative z < phi z < -1/phi the dominant inequality is z < -1/phi this proves that if z is lower than -1/phi (the other root of the x^2-x-1 golden trinomial) or higher than phi (the golden ratio) then z(z+1) will be greater than z + (z+1) Now that I know that works, let's use e (epsilon, ie, VERY SMALL POSITIVE NUMBER) instead of 1 z(z+e) > z + (z+e) z^2 + ze > 2z + e z^2 > z(2-e) + e z^2 - (2-e)z - e > 0 quadratic equation tells us that our factors are: (2-e) +- sqrt((2-e)^2 + 4e) all divided by 2 which is 2 - e +- sqrt(4 - 4e + e^2 + 4e) all divded by 2 which is 1 - e/2 +- (1/2)sqrt(4 - e^2) e^2 is so small that it's negligible, so (1/2)sqrt(4 - e^2) is basically very very close to 1 leaving us with the two roots: 1 - e/2 +1 = 2 - e/2 1 - e/2 - 1 = -e/2 so (z-2+e/2)(z+e/2) > 0 thus: (z > 2 - e/2) AND (z > -e/2) OR (z < 2 - e/2) AND (z < -e/2) retaining only the dominant inequalities: z > 2 - e/2 OR z < -e/2 that basically means that if z is less than zero OR greater than 2, mutliplication will always be bigger than addition So that cements the proof that 1, 2 and 3 are the only integers that satisfy your problem for n=3. 123 132 213 231 312 321 Quote Link to comment Share on other sites More sharing options...
0 Guest Posted December 19, 2009 Report Share Posted December 19, 2009 (edited) 00 22 000 123 132 213 231 312 321 0000 1124 1142 1214 1241 1412 1421 2114 2141 2411 4112 4121 4211 Edited December 19, 2009 by jhyatt455 Quote Link to comment Share on other sites More sharing options...
0 unreality Posted December 19, 2009 Report Share Posted December 19, 2009 00, 000, and 0000 are not allowed because he specified "positive integer" Quote Link to comment Share on other sites More sharing options...
0 Guest Posted December 20, 2009 Report Share Posted December 20, 2009 00, 000, and 0000 are not allowed because he specified "positive integer" You are correct... I misread the post as "non-negative" integers. Oops... Please put away the noose. I really didn't mean it. :-} Quote Link to comment Share on other sites More sharing options...
0 Guest Posted December 20, 2009 Report Share Posted December 20, 2009 think of them as sets of numbers with sum/product properties; sum = product a+b = ab a = ab - b = b(a-1) a/(a-1) = b similarly a = b/(b-1) which means they both need to be numbers that can evenly divide the number one less than them. The only such integers are 0 and 2 22 00 but 00 is invalid with the conditions you gave, so 2,2 is the only equivalency set for n=2 for n=3 first, a general formula if all numbers in the set are the same for 'n' numbers, if that number is x nx = x^n n = x^(n-1) n^(1/(n-1)) = x so for n=2, x=2 for n=3, x = square root of 3 for n=4, x = cube root of 4 for n=5, x = fourth root of 5 etc. The only integer possible from that is n=2, x=2. So for n=3, integer sets of equivnums have to be different. It's easy to find CONSECUTIVE sets: x + (x+1) + (x+2) = x(x+1)(x+2) 3x + 3 = x(x+1)(x+2) 3(x+1) = x(x+1)(x+2) 3 = x(x+2) = x^2 + 2x 0 = x^2 + 2x - 3 = (x+3)(x-1) so x= -3 or x = 1 ie: -3,-2,-1 and 1,2,3 there's actually one more case. We divided out the term (x+1) so we have to check x = -1 as well: -1,0,1 that also has equal sum & product. (in fact it's easy to make them if you can have a zero in it, just do at least one zero and then some positive and negative numbers so that they cancel out for the addition part). But you want positive numbers, so 1,2,3 is the only set of CONSECUTIVE integers that fits the bill. But what about nonconsecutive... The general rule for n=2 is simple, a = b/(b-1) so a=3 and b=3/2 is such a set... 3+3/2 = 4.5 = 3 * 3/2 But for three numbers, I don't know if such a relationship exists. A long time ago I was really interested in these numbers and had like a notebook of stuff on em haha and it's somewhere but let me try... a+b+c = abc a+c = abc - b a+c = b(ac - 1) b = (a+c)/(ac-1) oh yeah that's right. I remember now. It works like this. Say you've already picked the first (n-1) numbers, and they can be anything as long as their product isnt 1. Then by adding just a single number (x) you can make the whole set equivalent of product and sum... here, 'Sum' is the sum of the first (n-1) numbers and 'Product' is their product... Sum + X = Product * X Sum = Product * X - X = X * (Product - 1) X = Sum / (Product - 1) that's the why the product cant be 1 (if it was, multiplying by X would make X but adding X would make X+1, and X cannot equal X+1) so if you had 1 and 2, the number to seal it is: (1+2) / (1*2 - 1) = 3/1 = 3 To find an integral solution for n=3, you need to find two integers whose sum divides their product minus one. For numbers above 3, it can be shown that the product is always greater than the sum. That's pretty intuitive but here's a short proof I think that would work: say you have a number, z. We want to ensure that z times z+1 is greater than z plus z+1... z(z+1) > z + (z+1) z^2 + z > 2z + 1 subtract z from both sides z^2 > z + 1 z^2 - z - 1 > 0 (z-phi)(z+1/phi) > 0 where phi is the golden ratio for that to be positive, both terms must be positive OR both terms must be negative. if both terms are positive then z - phi > 0 AND z + 1/phi > 0 -phi is lower than 1/phi, so the dominant inequality, therefore: z > phi Now if both terms are negative z < phi z < -1/phi the dominant inequality is z < -1/phi this proves that if z is lower than -1/phi (the other root of the x^2-x-1 golden trinomial) or higher than phi (the golden ratio) then z(z+1) will be greater than z + (z+1) Now that I know that works, let's use e (epsilon, ie, VERY SMALL POSITIVE NUMBER) instead of 1 z(z+e) > z + (z+e) z^2 + ze > 2z + e z^2 > z(2-e) + e z^2 - (2-e)z - e > 0 quadratic equation tells us that our factors are: (2-e) +- sqrt((2-e)^2 + 4e) all divided by 2 which is 2 - e +- sqrt(4 - 4e + e^2 + 4e) all divded by 2 which is 1 - e/2 +- (1/2)sqrt(4 - e^2) e^2 is so small that it's negligible, so (1/2)sqrt(4 - e^2) is basically very very close to 1 leaving us with the two roots: 1 - e/2 +1 = 2 - e/2 1 - e/2 - 1 = -e/2 so (z-2+e/2)(z+e/2) > 0 thus: (z > 2 - e/2) AND (z > -e/2) OR (z < 2 - e/2) AND (z < -e/2) retaining only the dominant inequalities: z > 2 - e/2 OR z < -e/2 that basically means that if z is less than zero OR greater than 2, mutliplication will always be bigger than addition So that cements the proof that 1, 2 and 3 are the only integers that satisfy your problem for n=3. 123 132 213 231 312 321 "for n=3 first, a general formula if all numbers in the set are the same for 'n' numbers, if that number is x " Will you please clarify the above for me? Quote Link to comment Share on other sites More sharing options...
0 unreality Posted December 20, 2009 Report Share Posted December 20, 2009 if all the numbers were the same (x) then for 'n' of those numbers, we want x as a function of n x+x+x+...+x = x*x*x*...*x nx = x^n n = x^(n-1) n^1/(n-1) = x thus implying that, for example, sqrt3 + sqrt3 + sqrt3 = sqrt3 * sqrt3 * sqrt3 which is correct Quote Link to comment Share on other sites More sharing options...
Question
Guest
Let us say a number is "balanced" if it is a positive integer and
its digit sum is equal to its digit product.
1a) Find all the two-digit balanced numbers.
1b) Prove that you found them all.
2a) Find all the three-digit balanced numbers.
2b) Prove that you found them all.
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.