Originally posted by TheMaster37Yes, those are the only numbers. Your first assignment as student is to read through the comprehensive output file and verify my proof.
My bad BigProblem, I do apologise :p
As long as my nickname is TheMaster, I will remain TheMaster. That nickname, however, in no way represents my level of expertise; I am entitled to my share of flaws and mistakes.
I do find it hilarious that you of all people would name anyone a student.
EDIT; Might be an idea to prove that your claim is correct. Are those the only numbers?
It's only ~1 million lines. Complete it, and I shall grant you your old title of "master" again.
Originally posted by BigDoggProblemWhere can I find that file, I can't wait to fill my moments of boredom with some real lecture 😉
Yes, those are the only numbers. Your first assignment as student is to read through the comprehensive output file and verify my proof.
It's only ~1 million lines. Complete it, and I shall grant you your old title of "master" again.
Originally posted by BigDoggProblemAh BD, you seem to have missed a couple of million numbers 😛
I believe your interpretation of the stipulation is indeed what the original poster intended. Thanks for clearing that up.
My new adjusted list is:
1, 3, 9, 27, 37, 111, 222, 333, 444, 555, 666, 777, 888, 999
Edit: In my code, I ruled out any three digit numbers that included leading zeros.
All numbers 1000 - infinity inclusive also divide as since they only divide 000, rearranging that = 000. Correct?
Originally posted by phgaoNo. 000 isn't really a three-digit number. If you insist that it is, you're only ruining your own problem. 😛
Ah BD, you seem to have missed a couple of million numbers 😛
All numbers 1000 - infinity inclusive also divide as since they only divide 000, rearranging that = 000. Correct?
TheStudent37: I can give you the complete table via e-mail, if you really want to see it:
The following table lists all possible n that were disqualified because they divided evenly into ABC, but not CAB or BCA.
1) 2) 3) 4) col 1 = n col 2 = abc col 2 = cab or bca
002 112 121 001 004 112 121 001 005 115 151 001 006 114 141 003 007 112 121 002 008 112 121 001 011 121 211 002 012 132 321 009 013 117 171 002 014 112 121 009 015 135 351 006 016 112 121 009 017 119 191 004 018 126 261 009 019 114 141 008 021 126 261 009 022 132 321 013 023 115 151 013 024 144 441 009 025 125 251 001 026 156 561 015 028 112 121 009 029 116 161 016 031 124 241 024 032 128 281 025 033 132 321 024 034 136 361 021 035 175 751 016 036 144 441 009 038 114 141 027 039 117 171 015 041 123 231 026 042 126 261 009 043 129 291 033 044 132 321 013 045 135 351 036 046 138 381 013 047 141 411 035 048 144 441 009 049 147 471 030 051 153 531 021 052 156 561 041 053 159 591 008 054 162 621 027 055 165 651 046 056 112 121 009 057 114 141 027 058 116 161 045 059 118 181 004 061 122 221 038 062 124 241 055 063 126 261 009 064 128 281 025 065 195 951 041 066 132 321 057 067 134 341 006 068 136 361 021 069 138 381 036 071 142 421 066 072 144 441 009 073 146 461 023 074 148 481 037 075 225 252 027 076 152 521 065 077 154 541 002 078 156 561 015 079 158 581 028 081 162 621 054 082 164 641 067 083 166 661 080 084 168 681 009 085 255 552 042 086 172 721 033 087 174 741 045 088 176 761 057 089 178 781 069 091 182 821 002 092 184 841 013 093 186 861 024 094 188 881 035 095 285 852 092 096 192 921 057 097 194 941 068 098 196 961 079 099 198 981 090 102 612 126 024 103 412 124 021 104 312 123 019 105 315 153 048 106 212 122 016
n|100a+10b+c=>nx=100a+10b+c
n|100b+10c+a=>nx=100b+10c+a
n|100c+10a+b=>nx=100c+10a+b
from this we can show that n has the form,
-999c=n(x-10z), 90b=n(z-10y), a=n*(something brutal in the form of x,y and z)
the only two numbers that divide both 999 and 90 are 3 and 9, thus 3 and 9 are the only 2 numbers that this holds for for all a,b,c,x,y,z. i think.
although i'm sure i've done something wrong. i'll look over it tomorrow as it's getting late and i have a headache.
EDIT: why spent hours defining brute-force algorithms when you can spend 10 mins fiddling with matrices and proving the darn thing? 😛
Originally posted by geniusPlease, show us a mathematical proof. I'd like to see it.
n|100a+10b+c=>nx=100a+10b+c
n|100b+10c+a=>nx=100b+10c+a
n|100c+10a+b=>nx=100c+10a+b
from this we can show that n has the form,
-999c=n(x-10z), 90b=n(z-10y), a=n*(something brutal in the form of x,y and z)
the only two numbers that divide both 999 and 90 are 3 and 9, thus 3 and 9 are the only 2 numbers that this holds for for all a,b,c,x,y,z. i think. ...[text shortened]... algorithms when you can spend 10 mins fiddling with matrices and proving the darn thing? 😛
Originally posted by BigDoggProblemthat's pretty much it, i think. i'll do some more this afternoon when i get a chance. i'm spending a while on a train so i'll give it a bash then.
Please, show us a mathematical proof. I'd like to see it.
basically, i think, you stick it in matrix form, find a, b and c in the form of n(px+qy+rz)/S and thus S divides n. then we need all the S's. and then find all the common divisors of the S's and B-I-N-G-O we have the answer. i think. and all the common divisors are 1,3 and 9. thus the only answers are 1, 3 and 9 that hold for all a,b,c,x,y and z.
off to church-i may post later. if i don't die first. i'm meeting my girlfriends parents later. argh! 😞
n|100a+10b+c=>nx=100a+10b+c
n|100b+10c+a=>ny=100b+10c+a
n|100c+10a+b=>nz=100c+10a+b
(100 10 1 )(a)=(nx)
( 1 100 10 )(b)=(ny)
( 10 1 100)(c)=(nz)
=>
(0 0 -999)(a)=(nx-10nz)
(1 10 10 )(b)=(11ny-nz)
(0 90 0 )(c)=(nz-10ny)
=>
-999c=n(x-10z), 90b=n(z-10y), a=n(109y/9+10x/999-1210x/999)
=>
-999=n(x-10z)/c, 90=n(z-10y)/b, 1=n(109y/9+10x/999-1210x/999)/a
C=(x-10z)/c, B=(z-10y)/b, A=(109y/9+10x/999-1210x/999)/a
=>1=nA, 90=nB, -999=nC where n is a positive integer and A, B and C are rational numbers.
thus, n must divide 1, 90 and 999. the only two numbers that hold to this criterea are 3 and 9. thus, n=3 and 9 for all a,b, c are positive integers such that n divides abc, bca, cab where a = hundreds, b = tens, c = ones.
.[_]
...\
.../
.|_
basically
Originally posted by geniusBut what about all the other numbers that work? 111, 222 or the seemingly odd one out 37?
n|100a+10b+c=>nx=100a+10b+c
n|100b+10c+a=>ny=100b+10c+a
n|100c+10a+b=>nz=100c+10a+b
(100 10 1 )(a)=(nx)
( 1 100 10 )(b)=(ny)
( 10 1 100)(c)=(nz)
=>
(0 0 -999)(a)=(nx-10nz)
(1 10 10 )(b)=(11ny-nz)
(0 90 0 )(c)=(nz-10ny)
=>
-999c=n(x-10z), 90b=n(z-10y), a=n(109y/9+10x/999-1210x/999)
=>
-999=n(x-10z)/c, 90=n(z-10y)/b, ...[text shortened]... es abc, bca, cab where a = hundreds, b = tens, c = ones.
.[_]
...\
.../
.|_
basically