Hardcore Maths Question
-
Judah Himango wrote:
I kind of cheated though
well thats ok , and of course there are more numbers but the fun is when you deduce how to do it It's the journey, not the destination
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTreeQuartz... wrote:
It's the journey, not the destination
Very true. I actually had fun writing a little piece of code to solve it, though, so it was the journey even still. :) I added some more code that added each match to a list box on a Windows Form. Then, after seeing how it froze up the UI, I did it on a background thread. Still, the UI thread would get flooded with matches, almost preventing it from painting, so I further chagned the code to only update during app idle. Voila, cool little WinForms program that solves it. :cool:
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
leppie wrote:
I wonder if its some kind of series...
It appears to be every 2520.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Judah Himango wrote:
It appears to be every 2520.
It is. Modifying the your code that I modified and posted, shows this to be true :)
I'd like to help but I am too lazy to Google it for you.
-
Quartz... wrote:
It's the journey, not the destination
Very true. I actually had fun writing a little piece of code to solve it, though, so it was the journey even still. :) I added some more code that added each match to a list box on a Windows Form. Then, after seeing how it froze up the UI, I did it on a background thread. Still, the UI thread would get flooded with matches, almost preventing it from painting, so I further chagned the code to only update during app idle. Voila, cool little WinForms program that solves it. :cool:
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Judah Himango wrote:
Voila, cool little WinForms program that solves it. :cool:
That's cool. Mine is just a plain boring console app :->
I'd like to help but I am too lazy to Google it for you.
-
Ok lets me be the first to ask a maths question Find a number which 1. divided by 10 gives a remainder 9 2. divided by 9 gives remainder 8 --- --- so on till divided by 2 gives a remainder 1 Any one ?
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTreeN(1) = 2519 N(2) = 2519 + 2520 = 5039 N(3) = 2519 + 2520 + 2520 = 7559 N(4) = 2519 + 2520 + 2520 + 2520 = 10079 ... N(n) = 2519 + (n - 1)*(2520) No idea what the heck it means, though. Care to enlighten us mathematically-challenged folks?
Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Site | My Blog | My Articles
-
N(1) = 2519 N(2) = 2519 + 2520 = 5039 N(3) = 2519 + 2520 + 2520 = 7559 N(4) = 2519 + 2520 + 2520 + 2520 = 10079 ... N(n) = 2519 + (n - 1)*(2520) No idea what the heck it means, though. Care to enlighten us mathematically-challenged folks?
Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Site | My Blog | My Articles
Jon Sagara wrote:
N(n) = 2519 + (n - 1)*(2520)
N(n) = (n * 2520) - 1 = 2520n - 1
**
xacc.ide-0.2.0.50 - now with partial MSBuild support!
**
-
N(1) = 2519 N(2) = 2519 + 2520 = 5039 N(3) = 2519 + 2520 + 2520 = 7559 N(4) = 2519 + 2520 + 2520 + 2520 = 10079 ... N(n) = 2519 + (n - 1)*(2520) No idea what the heck it means, though. Care to enlighten us mathematically-challenged folks?
Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Site | My Blog | My Articles
Some other interesting and useless observations:
1*2*3*4*5*6*7*8*9 is divisible by 2520 = 144
2520 is divisible by 2 * 3 * 5 * 7 = 12 (product of prime 1 - 9)
4 * 6 * 8 * 9 is divisible by 144 = 12 (product of 'non' prime 1 - 9):doh:
**
xacc.ide-0.2.0.50 - now with partial MSBuild support!
**
-
Ok lets me be the first to ask a maths question Find a number which 1. divided by 10 gives a remainder 9 2. divided by 9 gives remainder 8 --- --- so on till divided by 2 gives a remainder 1 Any one ?
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTree10! - 1 = 3628799. Its 1 less than a multiple of 1, 2, 3 ... 10.
-
10! - 1 = 3628799. Its 1 less than a multiple of 1, 2, 3 ... 10.
((3628799 + 1) / 10) / (2 * 3 * 4 * 6) + (9 - 7 + 8 - 10) + 1 = 2519. ;)
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
-
Ok lets me be the first to ask a maths question Find a number which 1. divided by 10 gives a remainder 9 2. divided by 9 gives remainder 8 --- --- so on till divided by 2 gives a remainder 1 Any one ?
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTreex = (i - 1) (mod i), 2 ≤ i ≤ 10. Thus, x = LCM(2, 3, 4, 5, 6, 7, 8, 9, 10) * k + LCM(2, 3, 4, 5, 6, 7, 8, 9, 10) - 1 LCM(2, 3, 4, 5, 6, 7, 8, 9, 10) = LCM(5, 7, 8, 9) = 23.32.5.7 = 2520. Thus, x = 2520k + 2519. min(x) = 2519. I had to redo it since I did it backwards.
"People who want to share their religious views with you almost never want you to share yours with them." - Anonymous Web - Blog - RSS - Math - LinkedIn
Last modified: Thursday, July 27, 2006 12:08:26 PM --
-
Ok lets me be the first to ask a maths question Find a number which 1. divided by 10 gives a remainder 9 2. divided by 9 gives remainder 8 --- --- so on till divided by 2 gives a remainder 1 Any one ?
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTreeI know I'm a little late (and a valid solution has already been given), but no real explanation has been made. You first need to find a number that is a multiple of all these multiples (10 * 9, 9 * 8, etc), then one less than that will give the proper remainders. So, to find the least common multiple, first break these into primes: 10 * 9 = 2 * 3 * 3 * 5, 9 * 8 = 2 * 2 * 2 * 3 * 3, 8 * 7 = 2 * 2 * 2 * 7, etc. Take out what is unique for each to get 2 * 2 * 2 * 3 * 3 * 5 * 7 = 2520. So, one answer (though you already know) to the original problem is 2519.
-
N(1) = 2519 N(2) = 2519 + 2520 = 5039 N(3) = 2519 + 2520 + 2520 = 7559 N(4) = 2519 + 2520 + 2520 + 2520 = 10079 ... N(n) = 2519 + (n - 1)*(2520) No idea what the heck it means, though. Care to enlighten us mathematically-challenged folks?
Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Site | My Blog | My Articles
its the LCM of all the numbers (2520) - 1
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTree -
I know I'm a little late (and a valid solution has already been given), but no real explanation has been made. You first need to find a number that is a multiple of all these multiples (10 * 9, 9 * 8, etc), then one less than that will give the proper remainders. So, to find the least common multiple, first break these into primes: 10 * 9 = 2 * 3 * 3 * 5, 9 * 8 = 2 * 2 * 2 * 3 * 3, 8 * 7 = 2 * 2 * 2 * 7, etc. Take out what is unique for each to get 2 * 2 * 2 * 3 * 3 * 5 * 7 = 2520. So, one answer (though you already know) to the original problem is 2519.
thanks: https://movied.org
-
x = (i - 1) (mod i), 2 ≤ i ≤ 10. Thus, x = LCM(2, 3, 4, 5, 6, 7, 8, 9, 10) * k + LCM(2, 3, 4, 5, 6, 7, 8, 9, 10) - 1 LCM(2, 3, 4, 5, 6, 7, 8, 9, 10) = LCM(5, 7, 8, 9) = 23.32.5.7 = 2520. Thus, x = 2520k + 2519. min(x) = 2519. I had to redo it since I did it backwards.
"People who want to share their religious views with you almost never want you to share yours with them." - Anonymous Web - Blog - RSS - Math - LinkedIn
Last modified: Thursday, July 27, 2006 12:08:26 PM --
thanks: https://movied.org
-
((3628799 + 1) / 10) / (2 * 3 * 4 * 6) + (9 - 7 + 8 - 10) + 1 = 2519. ;)
------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.
thanks: https://movied.org
-
10! - 1 = 3628799. Its 1 less than a multiple of 1, 2, 3 ... 10.
thanks: https://movied.org
-
its the LCM of all the numbers (2520) - 1
Omit Needless Words - Strunk, William, Jr.
Online Project Management
Universal DBA | Ajax Rating | ExplorerTreethanks: https://movied.org
-
N(1) = 2519 N(2) = 2519 + 2520 = 5039 N(3) = 2519 + 2520 + 2520 = 7559 N(4) = 2519 + 2520 + 2520 + 2520 = 10079 ... N(n) = 2519 + (n - 1)*(2520) No idea what the heck it means, though. Care to enlighten us mathematically-challenged folks?
Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Site | My Blog | My Articles
thanks: https://movied.org
-
Quartz... wrote:
It's the journey, not the destination
Very true. I actually had fun writing a little piece of code to solve it, though, so it was the journey even still. :) I added some more code that added each match to a list box on a Windows Form. Then, after seeing how it froze up the UI, I did it on a background thread. Still, the UI thread would get flooded with matches, almost preventing it from painting, so I further chagned the code to only update during app idle. Voila, cool little WinForms program that solves it. :cool:
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
thanks: https://movied.org
-
Some other interesting and useless observations:
1*2*3*4*5*6*7*8*9 is divisible by 2520 = 144
2520 is divisible by 2 * 3 * 5 * 7 = 12 (product of prime 1 - 9)
4 * 6 * 8 * 9 is divisible by 144 = 12 (product of 'non' prime 1 - 9):doh:
**
xacc.ide-0.2.0.50 - now with partial MSBuild support!
**
thanks: https://movied.org
-
Jon Sagara wrote:
N(n) = 2519 + (n - 1)*(2520)
N(n) = (n * 2520) - 1 = 2520n - 1
**
xacc.ide-0.2.0.50 - now with partial MSBuild support!
**
thanks: https://movied.org