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!)
A272306 Lesser of two consecutive semiprimes whose sum is also semiprime. 5

%I #16 Jan 04 2019 18:54:55

%S 4,6,25,34,38,39,46,51,57,65,69,77,87,93,95,106,111,118,129,133,145,

%T 146,161,166,169,177,178,187,194,201,205,206,209,213,218,221,249,262,

%U 278,291,298,305,309,314,323,334,335,341,355,361,377,381,394,395,407,422,446,447,473

%N Lesser of two consecutive semiprimes whose sum is also semiprime.

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

%e 51 is in the sequence because 51 = 3*17, the next semiprime is 55 = 5*11, and 51+55 = 106 = 2*53, is also semiprime.

%t s[n_] := PrimeOmega@n == 2; L = Select[Range@480, s]; Pick[ Most@L, s /@ (Plus @@@ Partition[L, 2, 1])] (* _Giovanni Resta_, Apr 25 2016 *)

%t Select[Partition[Select[Range[500],PrimeOmega[#]==2&],2,1], PrimeOmega[ Total[ #]] == 2&][[All,1]] (* _Harvey P. Dale_, Jul 10 2018 *)

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

%o {for(i=1,500,if(bigomega(i)==2,a=proxsem(i);if(bigomega(a+i)==2,print1(i,", "))))}

%o (PARI) issemi(n)=bigomega(n)==2

%o 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(issemi(v[i+1]+v[i]), listput(u,v[i]))); Set(u) \\ _Charles R Greathouse IV_, Apr 29 2016

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

%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 May 7 16:48 EDT 2024. Contains 372310 sequences. (Running on oeis4.)