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
 1, 2, 3, 4, 5, 7, 8, 9, 11, 16, 17, 23, 25, 27, 29, 31, 41, 47, 59, 71, 79, 81, 101, 107, 125, 127, 137, 149, 167, 179, 191, 197, 227, 239, 241, 256, 269, 281, 311, 347, 359, 419, 431, 461, 521, 569, 599, 617, 641, 659, 727, 809, 821, 827, 839, 857, 881, 1019, 1031, 1049 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Every lesser of twin primes (A001359) is in the sequence. Every Fermat prime reduced by 1 and every Mersenne prime are in the sequence. LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 FORMULA a(n) >> n log^2 n. - Charles R Greathouse IV, Sep 21 2017 EXAMPLE 125 is in the sequence, since omega(125) = 1 and omega(125+2) = 1; 127 is in the sequence, since omega(127) = 1 and omega(127+1) = 1. MATHEMATICA Select[Range[3000], PrimeNu[#]<=1&&(PrimeNu[#+1]==1||PrimeNu[#+2]==1)&] (* Peter J. C. Moses, Sep 03 2017 *) 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 *) PROG (PARI) isok(n) = (omega(n) <= 1) && ((omega(n+1) == 1) || (omega(n+2)==1)); \\ Michel Marcus, Sep 04 2017 (PARI) is(n)=if(n<6, n>0, isprimepower(n) && (isprimepower(n+2) || isprimepower(n+1))) \\ Charles R Greathouse IV, Sep 21 2017 (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 CROSSREFS Cf. A000043, A001221, A001359, A019434. Sequence in context: A214577 A280994 A138039 * A192137 A192139 A080664 Adjacent sequences:  A289992 A289993 A289994 * A289996 A289997 A289998 KEYWORD nonn AUTHOR Vladimir Shevelev, Sep 03 2017 EXTENSIONS More terms from R. J. Mathar, Sep 03 2017 STATUS approved

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 July 21 00:49 EDT 2019. Contains 325189 sequences. (Running on oeis4.)