editing
approved
editing
approved
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 *)
approved
editing
editing
approved
a(n) >> n log^2 n. - Charles R Greathouse IV, Sep 21 2017
approved
editing
editing
approved
Charles R Greathouse IV, <a href="/A289995/b289995.txt">Table of n, a(n) for n = 1..10000</a>
(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=2, 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
(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=2, 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
approved
editing
editing
approved
n=125 is in the sequence, since omega(125) = 1 and omega(125+2) = 1;
n=127 is in the sequence, since omega(127) = 1 and omega(127+1) = 1.
Select[Range[3000], PrimeNu[#]<=1&&(PrimeNu[#+1]==1||PrimeNu[#+2]==1)&] (*_ _Peter J. C. Moses_, Sep 03 2017 *)
nonn,changed
nonn
reviewed
editing
proposed
reviewed