How many 6-digit integers have the following properties:
1 - That the sum total of their digits = 23
2 - That they be multiples of 23, or divisible by 23.
3 - That all their 6 digits be different from each other, or no repeats allowed.
Thank you for any help.
\(1)\\ \text{The first digit can take values 1-9, the other 5 can take values 0-9}\\ \text{Noting that $\sum \limits_{k=0}^{n} = \dfrac{1-x^{n+1}}{1-x}$ we have}\\ \text{the generating function for the first digit is }\\ d_1(x) = \sum \limits_{k=1}^9 x^k = x \dfrac{1-x^9}{1-x}\\ \text{and for the rest of the digits it is}\\ d(x) = \dfrac{1-x^{10}}{1-x}\)
\(\text{We want the coefficient of $x^{23}$ in $d_1(x)(d(x))^5$}\\ \text{Using software I find that }\\ c_{23} = 41712\)
.Rom: I get a completely different answer, way way smaller than yours! Here is the code:
n=0;p=0;cycle:a(100000+n);b=int(a/100000);c=int(a/10000)%10;d=int(a/1000)%10;e=int(a/100)%10;f=int(a/10)%10;g=a%10;n=n+1;if(b+c+d+e+f+g==23 and a%23==0 and b!=c and b!=d and b!=e and b!=f and b!=g and c!=d and c!=e and c!=f and c!=g and d!=e and d!=f and d!=g and e!=f and e!=g and f!=g, goto loop,goto cycle);loop:p=p+1;printa," ",;if(n<=882031, goto cycle, 0);print"Total = ",p
1 - They all sum up to 23. Are multiples of 23. And all 6 digits different from each other.
They total = 352. They begin with: 102695 104765 104972 105386 106835 107249 107456.......and end in
946013 951602 952016 952430 963401 981203 982031 Total = 352
I have just been playing with the numbers. I do not know how to do this.
But these are the possible combinations of 6 digits that add up to 23.
0 1 2 3 8 9
0 1 2 4 7 9
0 1 2 5 6 9
0 1 3 4 6 9
0 2 3 4 5 9
0 1 2 5 7 8
0 1 3 4 7 8
0 1 3 5 6 8
0 2 3 4 6 8
1 2 3 4 5 8
1 2 3 4 6 7 (added on)
0 2 3 5 6 7
0 1 4 5 6 7
So that is 12 groups of 6 digits.
Now it canot begin with 0 becasue that would not be a proper number.
The digits add to 23 so none of these will be divisable by 3 or 6 or 9. I am not sure what that means, I am getting in a mess.
So I have a lot LESS than
5*5!*11+6! =6600+720 = 7320 ways
plus another 720 = 8050
352 ways certainly sounds possible
Edit
oh dear, I just realize that 1 2 3 4 6 7 is missing. I wonder how many others are missing. I think not many, hopefully none.
Notice that each number must meet 3 conditions:
That its 6 digits add up to 23, and must be divisible by 23, and all 6 digits different from each other. 123467 is NOT divisible by 23. 123467 mod 23 = 3.
I know 0123467 is not divisable by 23.
Its digits do however add to a 23. Maybe if those digits are rearranged then you will get a number that IS divisable by 23.
I have found 13 sets of 6 numbers. Each set comply with the first and 3rd conditions.
0123467 is one of those sets.
Now it is a matter or rearranging the digits in each set to work out which permutations of digits will give a number divisable by 23.
The computer automatically arranges them in numerical order. Here is the list:
102695 104765 104972 105386 106835 107249 107456 109526 120497 123809 124637 128570 129605 130847 132089 134780 135608 136850 137264 138092 138506 138920 140369 140576 140783 142853 143267 146372 148235 149063 149270 150926 153824 154238 156308 159206 159620 165209 165830 170384 178043 178250 180527 180734 182390 183425 184253 185702 186530 190256 190463 192740 194603 196052 203918 204539 204953 205367 205781 206195 207851 209714 210749 210956 213647 213854 215096 217580 219650 234761 236417 238901 239108 240971 241385 245318 248630 250493 253184 256703 256910 259601 260843 263741 265190 267053 270158 270365 273056 274091 280715 281543 281750 283406 286304 290651 291065 294170 298103 298310 301829 302657 302864 305762 307418 307625 308246 309281 314870 315284 316940 320459 321908 324185 324806 325841 326048 340952 341780 342608 342815 345092 345920 346127 347162 349025 350267 350681 354821 356270 360824 362480 367241 369104 372416 376142 381524 382145 384215 390218 390425 391046 391460 392081 396014 401396 402638 403259 405329 406157 406571 407192 407813 410297 412367 413609 416093 416507 418370 428306 428513 430169 431825 432860 436172 437621 451076 451283 452318 458321 460391 463082 463910 467015 471362 472190 473018 476123 479021 480263 485231 487301 490613 491027 502619 503861 506138 509243 510278 510692 512348 514832 516074 516902 521870 523940 528701 531806 532841 534290 537602 538016 540293 541328 543812 546710 560372 561407 563270 567203 567410 568031 573206 573620 576104 581072 582107 582314 583142 592043 594320 601358 603428 603842 605291 605912 607154 609431 610259 612743 612950 617504 620195 621437 623507 623714 625370 629510 630752 631580 632408 634271 635720 638204 641309 641723 641930 642137 643172 647105 647312 650417 650831 651038 652073 652901 653108 657041 671324 674015 680432 681053 691403 694301 701546 702581 704651 706514 709412 710654 714380 715208 716243 716450 718520 724109 724316 730526 741083 741290 745016 746051 750812 751640 756401 760541 763025 765302 780413 781034 783104 790142 801527 801734 804632 810635 812705 813740 815603 817052 820157 820364 820571 830714 830921 831542 834026 835061 836510 839201 840236 842306 842513 846032 850172 851207 854312 857210 860315 861350 863420 870251 875012 890123 893021 902543 903164 904613 905234 908132 910823 912065 916205 917240 920138 920345 921380 923450 924071 925106 930281 935042 940217 940631 942701 946013 951602 952016 952430 963401 981203 982031 Total = 352
I checked the answer via Mathematica as usual doing
Select[Range[100000, 999999],
Plus @@ IntegerDigits[#] == 23 &] // Length
This selects all integers in the range 100000-999999
whose sum of digits equals 23 and then counts the length of that list.
It returns 41712
As I said before I didn't consider this a single problem.
When we apply all 3 conditions yes the answer is 352
I'm going to have to give some thought (or not) about how to derive that number w/o software.