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

Home > Numbers
Block Distribution (Posted on 2024-04-23) Difficulty: 3 of 5
Ms Math's kindergarten class has 16 registered students. The classroom has a very large number, N, of play blocks which satisfies the conditions:

(a) If 16, 15, or 14 students are present in the class, then in each case all the blocks can be distributed in equal numbers to each student, and

(b) There are three integers 0 < x < y < z < 14 such that when x, y, or z students are present and the blocks are distributed in equal numbers to each student, there are exactly three blocks left over.

Find the sum of the distinct prime divisors of the least possible value of N satisfying the above conditions.

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 2 of 4 |
[Edit: corrected to show only the distinct prime factors]

lcm(14,15,16) = 1680, so the number of blocks is 1680*k

Program Output:
220080 [9, 11, 13]
[2, 3, 5, 7, 131]
154
-----------------
N = 220080 
(x,y,z) = (9,11,13)
The requested sum is 148
-----------------

for x in range(0,10000000,1680):
    leftover3 = 0
    kidnums = []
    for kids in range(2,14):
        if x%kids == 3:
            leftover3 += 1
            kidnums.append(kids)
            # if x > 1000000:
            #     print('  ',x, kids )
    if leftover3 == 3:
        print(x, kidnums )
        break

# print(prime_factor(x))      ########  commented out
print(list(set(prime_factor(x))))
# print(sum(prime_factor(x))) #######  commented out
print(sum(list(set(prime_factor(x)))))

Edited on April 24, 2024, 10:43 am
  Posted by Larry on 2024-04-23 21:35:41

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