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

Home > Numbers
Minimum Value Muse 3 (Posted on 2023-11-12) Difficulty: 3 of 5
Determine the minimum value of a positive integer N such that each of N, N+1, N+2, N+3, N+4, and N+5 has the same number of divisors (including 1 and itself.)

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 1 of 2
The minimum value for N is 28374.

Searching up to 1 million, the following values of N, where each of  N+i {i from 0 to 5} have 8 divisors:
[28374, 90181, 157493, 171893, 171894, 180965, 180966, 210133, 298694, 346502, 369061, 376742, 610310, 647381, 647382, 707286, 729542, 769862]

It is curious that the first 18 solutions would each have exactly 8 divisors.

-----------------------
def nfactors(n):
    ans = [1,n]
    for i in range(2,2+int(n**.5)):
        if n%i == 0:
            ans.append(i)
            ans.append(int(n/i))
    ans = sorted(list(set(ans)))
    return len(ans)

ansDict = {}
for n in range(1000000):
    x=nfactors(n)
    if nfactors(n+1) != x:
        continue
    if nfactors(n+2) != x:
        continue
    if nfactors(n+3) != x:
        continue
    if nfactors(n+4) != x:
        continue
    if nfactors(n+5) != x:
        continue
    print(n,x)
    if x not in ansDict:
        ansDict[x] = [n]
    else:
        ansDict[x].append(n)

print(ansDict)

  Posted by Larry on 2023-11-12 07:27:33
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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