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

Home > Numbers
N+1 to N+5 (Posted on 2024-05-30) Difficulty: 3 of 5
Find the smallest integer N such that N+1 is a prime, N+2 is the product of 2 primes, N+3 is the product of 3 primes, N+4 is the product of 4 primes and N+5 is the product of 5 primes.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3
clearvars
seq=[length(factor(2)) length(factor(2)) length(factor(3)) length(factor(4)) length(factor(5))];
found=false; n=6;
while ~found
  seq=[seq(2:end) length(factor(n))];
  if isequal(seq,[1 2 3 4 5])
    disp(n-5)
    found=true;
    n=n-5;
    break
  end
  n=n+1;
end
for i=1:5
  disp([n+i factor(n+i)])
end


     n+...         prime factors
  
       15120
       15121       15121
       15122           2        7561
       15123           3          71          71
       15124           2           2          19         199
       15125           5           5           5          11          11

  Posted by Charlie on 2024-05-30 22:51:49
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 (5)
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