[seqfan] Re: A112775: consecutive terms with common gap 1.

Charles Greathouse charles.greathouse at case.edu
Thu Feb 9 05:34:02 CET 2017


Here's a crude one-line (on a sufficiently wide monitor) sieve:

semisearch(a,b,sz=12,m=Mod(1,6))=my(v=List(),t,gap=m.mod*sz);
forprime(p=2,sqrtint(b\1+1)-1,forprime(q=max(p,(a-1)\p+1),b\p, t=p*q;
if(t==m, listput(v,p*q)))); v=Set(v); for(i=sz+1,#v,
if(v[i]-v[i-sz]==gap,return(v[i-sz])))

which can be invoked like so:

forstep(n=1,1e12,10^6, t=semisearch(n,n+10^6+100,11,Mod(1,6)); if(t,
return(t\6))) \\ rediscovers 10083 in 140 ms
forstep(n=1,1e12,10^6, t=semisearch(n,n+10^6+100,12,Mod(1,6)); if(t,
return(t\6)))
forstep(n=1,1e12,10^6, t=semisearch(n,n+10^6+100,14,Mod(5,6)); if(t,
return(t\6)))
forstep(n=1,1e12,10^6, t=semisearch(n,n+10^6+100,13,Mod(1,6)); if(t,
return(t\6)))

Charles Greathouse
Case Western Reserve University

On Wed, Feb 8, 2017 at 8:43 PM, Zak Seidov <zakseidov at mail.ru> wrote:

>
>  For n=10083 and 214983,
> n through n+11 are terms in A112775 (Numbers n such that 6n+1 is
> semiprime).
> Are there longer sets of consecutive terms with common gap 1 in  A112775?
>
> Zak  Seidov
> PS The same Q for A112776  ( Numbers n such that 6n+5 is semiprime).
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>


More information about the SeqFan mailing list