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

Home > Numbers > Sequences
Semiprimes in Arithmetic Sequence (Posted on 2022-11-20) Difficulty: 4 of 5
30 semiprimes, each less than 108, form an arithmetic sequence with strictly positive common difference.

Determine all of them.

Note: A semiprime is the product of exactly two primes.

*** For an extra challenge only, find a semi-analytic solution (simple calculator + p&p) to this puzzle.

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.)
Some Thoughts a failed attempt | Comment 1 of 11
% nos=repmat('0',1,99999999);
% for i=4:99999999
%    if length(factor(i))==2
%       nos(i)='1';
%    end
% end
% fid=fopen('c: b5 projects looblesemiprimes.txt','w');
% fprintf(fid,'%s ',nos);
% fclose(fid);
fid=fopen('c: b5 projects looblesemiprimes.txt','r');
isSemi=fgetl(fid);
fclose(fid);

l=length(isSemi); o=ones(1,30);
for diff=floor(l/30):-1:2626
  for st=1:diff-1
     last=st+diff*floor((99999999-st)/diff);
     tst=isSemi(st:diff:last);
     ix=strfind(tst,o);
     if ~isempty(ix)
        disp([diff st ix(1)])
        disp(ix)
        disp(' ')
     end
  end
end

The commented part (% signs) produced a file with 1's for semiprimes and zeros for the other integers, up to the limit specified.

The still-active code attempted to try all possible intervals, and starting points relative to the given interval, to find a sequentially positioned set of 1's, but there are too many possibilities to run in a realistic time frame.

It does call for some analysis to at least whittle down the possibilities.

Edited on November 20, 2022, 11:08 am
  Posted by Charlie on 2022-11-20 11:07:03

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 (3)
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