All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers > Sequences
Just 3 digits (Posted on 2018-05-17) Difficulty: 4 of 5
A 10-digit number 2404563210 has an interesting feature: reading from left to right - any k-digit string is divisible by k.
No big deal ! IMHO there are 2492 numbers like that.

At least one of them utilizes only 3 distinct digits.

Find this number.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
interesting aside | Comment 3 of 4 |
Some internet research shows that in addition to the 2492 numbers that exhibit the feature (without the restriction of number of distinct digits used), there's a number that extends the divisibility criterion all the way to 25 digits: it is 3,608,528,850,368,400,786,036,725.

The limits of VB prevent me from going beyond 15 digit numbers but the number of qualifying numbers with a given number of digits goes as follows for 10- to 15-digit numbers:

digits    number of qualifying numbers
10           2492
11           2225
12           2041
13           1575
14           1132
15           770

The 770 15-digit numbers are listed below, with the number of unique digits used. There are two that use just 4 unique digits each, 384000408000300 and 600804486048060:

102006162060465 6
102456963072105 9
102852405048960 8
102858723000885 7
105258321084840 7
105600645048645 6
108000963072660 8
108006561084525 7
108054801036000 7
108402723000045 8
108852804060000 7
120054249048585 7
120456081024585 7
120456729036840 10
120858561012840 7
123204249084840 7
123204969036525 8
123252561084945 9
123258168000525 7
123600402096645 8
123606009012225 7
123606081060840 7
126000720012720 5
126000729036000 7
126402561012000 6
126408168048540 7
126450882036780 9
126456480048645 7
126858960036900 8
129252240048120 7
129252969012720 7
129600162012165 6
129606480084900 7
129654000084705 9
141204006024900 6
141204726084525 8
141654168048960 7
144006804048945 7
144408645048225 7
144456246000360 7
144804807072945 8
144804888036900 7
144852408036705 9
144852480084060 7
144858087000900 7
147204486000045 8
147252726060720 7
147654567060000 6
162054963072660 9
162402165096645 7
162402804084360 7
162408402096225 8
162450405048120 7
162450486000465 7
162456723000045 8
162804645084900 8
165258882036360 7
165600486048480 6
165606723048060 9
168000084012885 7
168006321012465 8
168408801000720 7
168450165072840 8
168450885024525 7
168456402072420 8
168858963024780 10
180006489084525 8
180054720012720 7
180054729036000 10
180456561012000 7
180852723048480 8
183204009012780 8
183204081060000 7
183252321012885 6
183600243096480 8
183600963048165 8
183654162012165 8
186054489060720 9
186450642072525 8
186804882000105 7
186858720072780 7
186858729096060 8
189204408036840 8
189252720036945 10
189258327060465 10
189606240012840 7
189606249036120 8
189606960072465 9
189654561036225 9
201204567084360 9
201252168048120 7
201258486000045 7
201600000036540 7
201600720096165 7
204006645048780 7
204054966060405 6
204402807072105 7
204408486048060 5
204804648072780 6
204852249036540 8
204852960072885 8
204852969096165 8
207258165072420 8
207258885024105 7
207600480012945 9
207600489036225 9
207606006084120 7
222000885048885 5
222006402096780 7
222054084012885 6
222408243096060 7
222804405012840 6
222852006084540 6
222852726036225 7
225258642072105 8
225600246084225 6
228000564000300 7
228054483036945 8
228402324048645 7
228804804036900 7
228852486060945 7
228858003000900 6
228858723060525 7
240000642096885 7
240006249012465 7
240402483096165 9
240408000036120 7
240408729000720 6
240450723048900 8
240804963084420 7
240858882000105 6
243252801000300 7
243258408036840 7
246006648036525 7
246054240084945 7
246402882000660 5
246408480012525 7
246450402000465 5
246450483072360 8
246456081084225 7
249204240012000 5
249252561036780 10
249600402048480 6
249606729024945 7
261252648036945 9
261606168012840 6
261606888072465 8
261654480012945 8
261654489036225 9
264000168084945 8
264000807072660 6
264006405084525 6
264408966036885 8
264450240012420 6
264450960072045 7
267204087048645 7
267204726036360 6
267606567036900 7
282054564000300 7
282402405012000 6
282408723084885 7
282450726036780 8
282456324048645 7
282852567036060 7
282858804036900 8
285252165000465 7
285258402000045 5
285600006012165 6
285600087084060 7
285606324084900 8
288402165048480 7
288408402048060 5
288450486060105 7
288858564060360 7
300408561096840 8
300456882000660 7
300804084024645 7
300804723012360 8
300852324084060 7
303258240012000 7
303654402048480 7
306000801048885 7
306006489036360 6
306054000012885 8
306054009036165 7
306054081084780 8
306402642048165 8
306408249072945 9
306804483048705 7
306852084000840 7
306858321000420 8
309204009072420 6
309204720000825 8
309204729024105 8
309252321072525 7
309606561000105 6
309654882024885 8
321204168012000 7
321252480012105 7
321252489036780 10
321258087048645 9
321258726036360 8
324006246084360 6
324006966036045 7
324408087084900 7
324450009072840 8
324450729024525 7
324804240096705 9
324804249000420 6
324804969060045 8
324852561000525 8
324858807024780 7
327252807096885 8
327606327072780 6
327654648096165 10
342000486084465 7
342006003024420 5
342006723084045 8
342402966072720 7
342456165048480 8
342804726000105 9
345258963060765 9
345600567072885 8
345606804072465 8
345606885036420 7
345654405036225 6
348000165048900 8
348006483000825 7
348054084072525 7
348054723060240 8
348804486036585 6
360000243024525 6
360006561096000 6
360054801048885 7
360408321024780 8
360456642048165 8
360852804072885 8
360852885036840 7
360858483048705 7
363204162096165 8
363252402048900 8
363258009072420 9
363258720000825 7
363258729024105 10
363600324012945 8
363606642084420 6
366006249072105 9
366408009000885 7
366408720048840 7
366450084000000 6
366804243084585 7
369204561000660 8
369252162072360 8
369252882024045 8
369600003084060 6
381204648000825 8
381252249072525 9
381600162024900 8
381600882084525 8
381606489000105 8
384000408000300 4
384054327036945 9
384402960048945 8
384408567072465 8
384456168036225 8
384804000024645 7
384804081096540 8
402054165048900 8
402402087012945 8
402402726000660 5
402408324012525 7
402450327072360 7
402852168072900 9
402858486036585 7
405252405036780 8
405258003048645 7
405654246036060 6
405654966096945 5
408000645036465 6
408408003084900 5
408450726096420 8
408804966024000 6
420000084024360 6
420408882084105 6
420450804072045 6
420450885036000 7
420858243084585 6
423258561000660 8
423600165012780 9
423606402012360 6
423654003084060 7
426000402084465 6
426000483048420 6
426006009000045 6
426006720048000 6
426456882060300 7
426804723072000 7
429204321048165 9
429258960024720 8
429258969048000 7
429600564036840 8
429606162048705 9
429606801036420 8
429654483060465 8
441204480096945 8
441204489000660 7
441252009000465 7
441252720048420 7
441600642012465 6
444000240096420 5
444000960048105 7
444054168036780 8
444402009048480 5
444450321048585 7
444852801036840 8
444858408060360 6
447204807060765 7
447204888024720 5
447252408024525 6
447252489096420 8
447258726096000 8
447600321084840 8
447606648060045 6
447654240000525 6
462000087012105 8
462054645036465 6
462408165012360 8
462804327048705 8
462852648060465 6
462858966024000 7
465204645072720 6
465252966096105 7
465600168000525 7
465606405000105 5
465606486072000 7
465654726024885 7
468006084048165 6
468402246072885 7
468408564036420 7
468804087072165 8
468852327024900 9
480006801012765 8
480006882084660 5
480054402084465 6
480054483048420 6
480408642012045 7
480804885000720 6
480852405000525 5
480852486072420 7
480858723072000 7
483252084048585 6
483258321048165 8
483654564036840 6
486402003012945 9
486402084084840 5
486408321084420 7
486858402036585 7
489258081072885 8
501204240024885 6
501204249048165 8
501258807060765 7
501258888024720 7
501606081024165 7
501606729036420 9
501654321084840 8
504000000024360 6
504000009048900 5
504006327000825 8
504402561084525 7
504408168000105 6
504450801036000 7
504456489024885 7
504858240048540 5
507252249024360 8
507600882036360 7
507606480048225 7
507654009060945 6
507654081000360 8
522006885072405 7
522456246072885 7
522804168048540 7
522852480048645 6
522858087072165 7
525204405000660 5
525252006072360 6
525252726024045 6
525606966060825 6
528000246072045 7
528402726060300 8
528456645096945 7
528852807012465 8
528852888084360 7
528858486096225 7
540402804048945 6
540456003012945 8
540456084084840 5
540804645048225 6
540852246000360 7
543204963072240 8
543252564036000 6
543600486000045 6
546000003012105 7
546000084084000 5
546450165036165 6
546852645024420 6
549258561060300 9
549600165072420 8
549600885024105 8
549606402072000 7
549654723096780 9
561204720012300 8
561252321084000 8
561654882036360 8
564006168000660 6
564006888060285 6
564054480000765 6
564054489024045 7
564402321012465 7
564456969012300 8
564804801000720 8
564852402072420 7
567204480048780 7
567204489060300 9
567252000048585 7
567252009060105 7
567600642072105 7
582000327048420 7
582006645000345 7
582054246072045 7
582450489060720 8
582456726060300 8
585258804024720 6
585600408036840 6
585606006048705 6
585654327060465 8
588006324072720 8
588054645096105 7
588408165072000 8
588456405024885 6
588456486096780 7
588858246024165 7
600000804048105 6
600006483012300 7
600054003012105 7
600054084084000 5
600402645048780 7
600450966060405 5
600804486048060 4
603204084012465 8
603204723000180 8
603606564000720 7
603654165072420 8
603654885024105 8
606000564072825 7
606006801072405 8
606456243036840 7
606456963096465 6
606804165000885 6
606858003072165 8
606858084036120 8
609204483036525 8
621252801072825 7
621258480048780 8
621258489060300 9
621654642072105 7
624408408036420 6
624450483036945 8
624456000084840 6
624456720036525 7
627204240084525 7
627258168024885 8
627600402000045 6
627606009036585 8
642006486000180 6
642402648036525 7
642450240084945 7
642804480012525 7
642852081084225 7
645600240012000 6
648006804060285 6
648006885024240 6
648054405024045 6
648408645060825 6
648450648012720 8
648852489012000 8
660054564072825 7
660402405084525 6
660804966036885 7
660858165000885 5
663252885024660 7
663258483036525 7
663600087048645 7
663600726036360 5
663606324048225 7
666000324000765 7
666006642072240 5
666054243036000 6
666402165000045 6
666450405060720 6
666852246060000 6
666858564024945 7
669606084072945 8
669606723060660 6
669654324024420 7
681252642072660 8
681258240084525 7
681606882000240 6
681654402000045 7
684000162012720 7
684000882072345 8
684054000084000 5
684456561036360 7
684804402048060 5
684858321072945 10
687204000012465 8
687204081084360 8
687258648012300 9
687600963060765 7
687654801024105 8
687654882096000 8
702006246048945 8
702402489036360 8
702408087048225 6
702450000012885 7
702450009036165 9
702450081084780 7
702804249072945 7
705252168060720 7
705252888012405 7
705258405060300 8
705600009072420 7
705600720000825 6
705600729024105 8
708054966084765 7
708402807096465 8
708408486060660 5
708456006060465 6
708456087024420 7
708852240036225 8
708852969000825 7
720006003096945 8
720054324000765 7
720402246084360 7
720402966036045 8
720456165000045 7
720804087084900 6
723204324048780 6
723252645060405 7
723606165048060 9
726006402000180 7
726054723024825 8
726408243000720 7
726408963060345 9
726450966012240 8
726456564024105 7
729204084072105 8
729258642096465 8
741204801048465 8
741258000012465 8
741258081084360 9
741654963060765 8
744000642000285 7
744006969096300 6
744402483000825 7
744408009072000 6
744408720000405 6
744450084072525 6
744450723060240 7
744456321072105 8
744858162072780 8
744858882024465 7
747252162036945 9
747252801024660 8
747600003048645 7
762000408072825 7
762000480012240 7
762006087048780 6
762402249072105 8
762456807096465 8
762804009000885 8
762804720048840 6
765204327036525 7
765600561000660 5
768450240036780 8
768804408024945 8
768804489096840 6
768852009096645 8
768852081036060 8
780006564048465 6
780450327036945 9
780804567072465 7
780852168036225 8
783252486060240 8
783258084072105 8
783606645036885 7
786054564024660 7
786402405036360 8
786408003048225 8
786804246036900 8
786804966096525 8
786858165060525 7
789252804012405 8
789252885084300 8
789600726096000 6
801252243000300 7
801606402084885 7
801606483048840 6
801654003048645 7
804006720000960 7
804006729024240 7
804054321072660 9
804408561000240 7
804804003084900 5
807258240036360 8
807258969000960 7
822000249072660 7
822000969024345 8
822402009000045 6
822402720048000 5
822852882060300 6
822858408024945 6
822858489096840 7
825204168036360 8
825252480036465 7
825600321048165 8
825654960024720 8
825654969048000 7
828000648096720 7
828054567012405 8
828402408024105 6
828402480072720 5
828402489096000 6
828450000072525 6
828450729048885 7
828804240000105 6
828804249024780 6
828852561024885 7
840000006012720 7
840000726072345 8
840408165084885 6
840450168036780 8
840456405036360 6
840858246036900 8
840858966096525 7
843204645036045 7
843600807060765 7
843600888024720 7
843654726096000 9
846006003048780 6
846054324060405 7
846456885012765 8
846804006072780 6
846804726024465 7
846852327096165 10
849252645012240 8
849258243024105 8
861204402084045 7
861204483048000 7
861600645072720 8
864000243048885 7
864054882024180 7
864402084048165 7
864456642060765 7
864804564036420 7
864858483060045 6
867204162000825 8
867252402060240 7
867258000072105 7
867258009096780 7
867258729048465 8
882000000096885 6
882054648096720 8
882408807060345 8
882408888024300 5
882456408024105 7
882456480072720 7
882456489096000 7
882804321084420 6
882858240000105 6
882858249024780 7
885252249096885 7
885606489024465 7
885654081072885 8
888000408024660 5
888006006036525 6
888402240000660 5
888402960060285 7
888402969084825 7
888450561024045 7
888804009060525 7
888858648048840 5
900000567072180 8
900006165084045 7
900402327000825 8
900408645072300 9
900804168000105 7
900852489024885 6
900858006072780 7
900858726024465 8
903252006036945 7
903606246072465 8
906000966096240 5
906054165060240 7
906408324036885 8
906852888048945 7
906858405096840 6
909606645096525 6
909654966000345 6
921204963036825 9
921258162000825 7
921600405000660 7
921606003012525 7
921606084084420 7
924000723036300 7
924408162048840 7
924852645096945 7
927600804024720 7
942054408024660 7
942408648060180 7
942456240000660 6
942456960060285 7
942456969084825 7
942858009060525 7
945204480000345 7
945252081072045 8
945252729084300 8
945654561060300 7
948000960060705 7
948054807048720 7
948402000048165 8
948402729012765 9
948456648048000 6
948852162060465 8
948858480024000 6
960054966096240 6
960402168000660 7
960402888060285 7
960408405000240 7
960450480000765 7
960450489024045 7
960852969012300 8
963600480048780 7
963600489060300 6
966000087036465 8
966000726024180 8
966006324036045 7
966402567024720 7
966408804024300 7
966450168096420 8
966450888048105 7
966456405096000 5
966804327060045 9
966858966048360 7
969258564012765 9
969600168024885 8
969606405024465 6
969606486096360 6
969654006096165 6
981252324036465 9
981654804024720 9
984006162048000 7
984402324072720 7
984450645096105 7
984804165072000 9
984852405024885 6
984852486096780 8
984858723096360 9
987258321060765 9
987606243036420 8
987606963096045 8
10 2492
11 2225
12 2041
13 1575
14 1132
15 770

DefDbl A-Z
Dim crlf$, n, ct(10 To 16), pass


Private Sub Form_Load()
 Form1.Visible = True
 Text1.Text = ""
 crlf = Chr(13) + Chr(10)
 
 For pass = 1 To 2
   n = 0
 
   addOn 1
 Next
 
 
 For i = 10 To 15
   Text1.Text = Text1.Text & i & Str(ct(i)) & crlf
 Next
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

Sub addOn(wh)
 DoEvents
  saveN = n
  If wh = 1 Then st = 1 Else st = 0
  For newd = st To 9
    n = 10 * saveN + newd
    q = Int(n / wh): r = n - q * wh
    If r = 0 Then
      If wh >= 10 Then
        uCt = 0: ReDim used(9)
        s$ = LTrim(Str(n))
        For i = 1 To Len(s)
          If used(Val(Mid(s, i, 1))) = 0 Then uCt = uCt + 1
          used(Val(Mid(s, i, 1))) = 1
        Next
        If pass = 2 And wh = 15 Then
          Text1.Text = Text1.Text & n & Str(uCt) & crlf
        Else
          If pass = 1 Then ct(wh) = ct(wh) + 1
        End If
      End If
      If wh < 15 Then
        addOn wh + 1
      End If
    End If
  Next
  n = saveN
End Sub


  Posted by Charlie on 2018-05-18 10:18:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information