login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A272309 Lesser of two consecutive semiprimes with a prime difference. 5

%I #14 Apr 29 2016 00:28:07

%S 4,6,22,26,35,39,46,49,55,62,69,74,77,82,91,95,106,115,119,134,143,

%T 155,159,161,166,178,183,185,187,194,203,206,215,219,221,235,247,254,

%U 259,262,265,267,287,289,295,299,303,309,314,319,321,323,327,329,339,341,355,358,362

%N Lesser of two consecutive semiprimes with a prime difference.

%H Charles R Greathouse IV, <a href="/A272309/b272309.txt">Table of n, a(n) for n = 1..10000</a>

%e 39 is in the sequence because 39 = 3*13, the next semiprime is 46 = 2*23, and 46-39 = 7 is prime.

%t L=Select[Range@370, PrimeOmega@# == 2 &]; Pick[Most@L, PrimeQ@ Differences@ L] (* _Giovanni Resta_, Apr 25 2016 *)

%o (PARI) proxsem(n)=local(p,s,r); s=0; p=n; while(s==0, p+=1; if(bigomega(p)==2, s=1; r=p));p

%o {for(i=1,400,if(bigomega(i)==2,a=proxsem(i)-i;if(isprime(a),print1(i,", "))))}

%o (PARI) list(lim)=my(v=List(),u=v); lim\=1; while(bigomega(lim++)!=2,); forprime(p=2,lim\2, forprime(q=2,lim\p, listput(v,p*q))); v=Set(v); for(i=1,#v-1, if(isprime(v[i+1]-v[i]), listput(u,v[i]))); Set(u) \\ _Charles R Greathouse IV_, Apr 29 2016

%Y Cf. A001358, A272306, A272307, A272308.

%K nonn

%O 1,1

%A _Antonio Roldán_, Apr 25 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 10:56 EDT 2024. Contains 371791 sequences. (Running on oeis4.)