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

Home > Numbers
Respectively Divisible II (Posted on 2023-02-10) Difficulty: 3 of 5
The numbers 637, 638, and 639 constitute a set of three consecutive positive integers (in order) that are respectively divisible by 13, 11, and 9.

Find the first set of four consecutive positive integers (in order) that are respectively divisible by 13, 11, 9, and 7.

How about the first set of five consecutive positive integers (in order) that are respectively divisible by 13, 11, 9, 7, and 5?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 3 of 4 |
The first line below creates a vector containing all the integers below 1 million that are 1 larger than a multiple of 13.

The second line produces one that contains 1 larger than each of those in the first vector that are multiples of 11.

The third line produces one that contains 1 larger than each of those in the second vector that are multiples of 9.

The fourth line produces one that contains 1 larger than each of those in the third vector that are multiples of 7.

The fifth line produces one that contains 1 larger than each of those in the fourth vector that are multiples of 5.

The sixth line produces one that contains 1 larger than each of those in the fifth vector that are multiples of 3.



thPlus1=1:13:1000000;
elevPlus1=thPlus1(mod(thPlus1,11)==0)+1;
ninePlus1=elevPlus1(mod(elevPlus1,9)==0)+1;
sevPlus1=ninePlus1(mod(ninePlus1,7)==0)+1;
fivePlus1=sevPlus1(mod(sevPlus1,5)==0)+1;
threePlus1=fivePlus1(mod(fivePlus1,3)==0)+1;
clc
      st=ninePlus1(1)-1;
      second=st-1;
      third=st-2;       
      disp([third,second,st])
   
      st=sevPlus1(1)-1;
      second=st-1;
      third=st-2;
      fourth=st-3;
      disp([fourth,third,second,st])
  
      st=fivePlus1(1)-1;
      second=st-1;
      third=st-2;
      fourth=st-3;
      fifth=st-4;
      disp([fifth,fourth,third,second,st])
    
      st=threePlus1(1)-1;
      second=st-1;
      third=st-2;
      fourth=st-3;
      fifth=st-4;
      sixth=st-5;
      disp([sixth,fifth,fourth,third,second,st])

finds
                             multiple of:
          13          11          9           7          5           3
          
         637         638         639
        4498        4499        4500        4501
       22516       22517       22518       22519       22520
       22516       22517       22518       22519       22520       22521

The first show the given 637, 638, 639.

The second answers part 1: 4498, 4499, 4500, 4501.

The third answers part 3: 22516, 22517, 22518, 22519, 22520

The last shows that the sequence that fits part 2 continues with the next integer, which is divisible by 3.


The second set of each is

        1924        1925        1926
       13507       13508       13509       13510
       67561       67562       67563       67564       67565
       67561       67562       67563       67564       67565       67566
       
obtained by starting with subscript 2 in each starting case, as in

st=ninePlus1(2)-1;


  Posted by Charlie on 2023-02-10 10:05:51
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 (9)
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