This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A289995 Numbers n with omega(n) <= 1 such that omega(n+1) = 1 or omega(n+2) = 1. 1

%I

%S 1,2,3,4,5,7,8,9,11,16,17,23,25,27,29,31,41,47,59,71,79,81,101,107,

%T 125,127,137,149,167,179,191,197,227,239,241,256,269,281,311,347,359,

%U 419,431,461,521,569,599,617,641,659,727,809,821,827,839,857,881,1019,1031,1049

%N Numbers n with omega(n) <= 1 such that omega(n+1) = 1 or omega(n+2) = 1.

%C Every lesser of twin primes (A001359) is in the sequence. Every Fermat prime reduced by 1 and every Mersenne prime are in the sequence.

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

%F a(n) >> n log^2 n. - _Charles R Greathouse IV_, Sep 21 2017

%e 125 is in the sequence, since omega(125) = 1 and omega(125+2) = 1;

%e 127 is in the sequence, since omega(127) = 1 and omega(127+1) = 1.

%t Select[Range[3000],PrimeNu[#]<=1&&(PrimeNu[#+1]==1||PrimeNu[#+2]==1)&] (* _Peter J. C. Moses_, Sep 03 2017 *)

%t onQ[{a_,b_,c_}]:=a<2&&(b==1||c==1); SequencePosition[PrimeNu[ Range[ 1100]], _?onQ][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 04 2019 *)

%o (PARI) isok(n) = (omega(n) <= 1) && ((omega(n+1) == 1) || (omega(n+2)==1)); \\ _Michel Marcus_, Sep 04 2017

%o (PARI) is(n)=if(n<6, n>0, isprimepower(n) && (isprimepower(n+2) || isprimepower(n+1))) \\ _Charles R Greathouse IV_, Sep 21 2017

%o (PARI) list(lim)=my(v=List([1]),p=3,t); forprime(q=5,lim+2, if(q-p<3, listput(v,p)); p=q); for(e=1,logint(lim\=1,2), t=2^e; if(isprimepower(t-1), listput(v,t-1)); if(isprimepower(t+1), listput(v,t))); for(e=2,logint(lim,3), forprime(q=3,sqrtnint(lim,e), t=q^e; if(isprimepower(t-2), listput(v,t-2)); if(isprimepower(t+2), listput(v,t)))); Set(v) \\ _Charles R Greathouse IV_, Sep 21 2017

%Y Cf. A000043, A001221, A001359, A019434.

%K nonn

%O 1,2

%A _Vladimir Shevelev_, Sep 03 2017

%E More terms from _R. J. Mathar_, Sep 03 2017

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

Last modified August 18 01:04 EDT 2019. Contains 326059 sequences. (Running on oeis4.)