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

Home > Just Math
Prime divisors (Posted on 2005-01-04) Difficulty: 3 of 5
6300846559 is such that 6 is divisible by 2; 63, by 3; 630, by 5; 6300, by 7; and, in general, if you take its first N digits, it will be divisible by the N-th prime.

There is only one other such 10 digit number: can you find it?

See The Solution Submitted by e.g.    
Rating: 3.7500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
another computer solution | Comment 12 of 13 |
This problem came up as Bonus today, and I couldn't resist practicing my MATLAB:

global n byLength

byLength=[;];
for i=2:2:8
   n=char(string(i)) ;
   addon
end
for l=2:10
   ct=0;
   for i=1:length(byLength(l,:))
     if byLength(l,i)>0
      fprintf('%d ',byLength(l,i)) 
      ct=ct+1;
     end 
   end
   fprintf('\n %d \n',ct)
end

function addon
global n byLength
for i=0:9
   n=[n char(string(i))];
   num=str2double(n);
   if mod(num,nthprime(length(n)))==0
    %  disp(num)
      l=length(n);
      byLength(l,end+1)=num;
      if length(n)<15
         addon 
      end
   end
   n=n(1:end-1);
end
end

Listed by length, followed by count of that length (single digits excluded):

21 24 27 42 45 48 60 63 66 69 81 84 87 
 13 
210 215 240 245 270 275 420 425 450 455 480 485 600 605 630 635 660 665 690 695 810 815 840 845 870 875 
 26 
2100 2107 2156 2401 2408 2450 2457 2702 2709 2751 2758 4200 4207 4256 4501 4508 4550 4557 4802 4809 4851 4858 6006 6055 6300 6307 6356 6601 6608 6650 6657 6902 6909 6951 6958 8106 8155 8400 8407 8456 8701 8708 8750 8757 
 44 
21076 21560 24013 24508 24574 27027 27093 27511 27588 42009 42075 45012 45089 45507 45573 48026 48092 48510 48587 60060 60555 63008 63074 63569 66011 66088 66506 66572 69025 69091 69586 81554 84007 84073 84568 87010 87087 87505 87571 
 39 
210769 215605 240136 245089 270270 270933 275119 275886 420095 420758 450125 450892 455078 480922 485108 485875 600600 605553 630084 630747 660114 660881 665067 690911 695864 815542 840073 840736 845689 870103 870870 875056 875719 
 33 
2107694 2156059 2401369 2450890 2751195 2758862 4200955 4207585 4508927 4550781 4851086 4858753 6055536 6300846 6307476 6608818 6650672 6958644 8155427 8400737 8407367 8708709 8750563 8757193 
 24 
21076947 21560592 27588627 42009551 45507812 63008465 66506726 81554270 84007379 84073670 87571931 
 11 
210769470 630084655 665067264 875719319 
 4 
6300846559 8757193191 
 2 

  Posted by Charlie on 2021-06-19 08:24:45
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 (12)
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