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

Home > Numbers > Sequences
Two cases (Posted on 2023-11-10) Difficulty: 3 of 5
Could one find a sequence of 14 consecutive positive integers such that:

(I) each of the members of such sequence will be divisible by a prime below 13?
(II) Same question for 21 members, each being divisible by a prime below 17?

Provide two independent answers for (I) and (II)

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer solution for part II only | Comment 1 of 4
clearvars,clc
disp('I')
good=true;
div=[2 3 5 7 11];
nlist=2; ct=0;
for n=nlist+1:999999
  nlist(end+1)=n;
  if sum(mod(n,div)==0)
    good(end+1)=true;
  else
    good(end+1)=false;
  end
  if length(nlist)>14
    nlist=nlist(end-13:end);
    good=good(end-13:end);
  end
  if sum(good)==14
    disp([nlist(1) nlist(end)])
    ct=ct+1;
    if ct>2
      break
    end
  end
end
disp('II')
clearvars
good=true;
div=[2 3 5 7 11 13];
nlist=30; ct=0;
for n=nlist+1:999999
  nlist(end+1)=n;
  if sum(mod(n,div)==0)
    good(end+1)=true;
  else
    good(end+1)=false;
  end
  if length(nlist)>21
    nlist=nlist(end-20:end);
    good=good(end-20:end);
  end
  if sum(good)==21
    disp([nlist(1) nlist(end)])
    ct=ct+1;
    if ct>2
      break
    end
  end
end


I
II
       first        last
       member      member

        9440        9460
       20570       20590
       39470       39490


 

  Posted by Charlie on 2023-11-10 07:53:23
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 (0)
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