This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A085987 #45 Apr 22 2025 03:51:03 %S A085987 60,84,90,126,132,140,150,156,198,204,220,228,234,260,276,294,306,308, %T A085987 315,340,342,348,350,364,372,380,414,444,460,476,490,492,495,516,522, %U A085987 525,532,550,558,564,572,580,585,620,636,644,650,666,693,708,726 %N A085987 Product of exactly four primes, three of which are distinct (p^2*q*r). %C A085987 A014613 is completely determined by A030514, A065036, A085986, A085987 and A046386 since p(4) = 5. (cf. A000041). More generally, the first term of sequences which completely determine the k-almost primes can be found in A036035 (a resorted version of A025487). %C A085987 A050326(a(n)) = 4. - _Reinhard Zumkeller_, May 03 2013 %H A085987 T. D. Noe, <a href="/A085987/b085987.txt">Table of n, a(n) for n = 1..1000</a> %H A085987 <a href="/index/Pri#prime_signature">Index to sequences related to prime signature</a> %e A085987 a(1) = 60 since 60 = 2*2*3*5 and has three distinct prime factors. %t A085987 f[n_]:=Sort[Last/@FactorInteger[n]]=={1,1,2}; Select[Range[2000], f] (* _Vladimir Joseph Stephan Orlovsky_, May 03 2011 *) %t A085987 pefp[{a_,b_,c_}]:={a^2 b c,a b^2 c,a b c^2}; Module[{upto=800},Select[ Flatten[ pefp/@Subsets[Prime[Range[PrimePi[upto/6]]],{3}]]//Union,#<= upto&]] (* _Harvey P. Dale_, Oct 02 2018 *) %o A085987 (PARI) list(lim)=my(v=List(),t,x,y,z);forprime(p=2,lim^(1/4),t=lim\p^2;forprime(q=p+1,sqrtint(t),forprime(r=q+1,t\q,x=p^2*q*r;y=p*q^2*r;listput(v,x);if(y<=lim,listput(v,y);z=p*q*r^2;if(z<=lim,listput(v,z))))));vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jul 15 2011 %o A085987 (PARI) is(n)=vecsort(factor(n)[,2]~)==[1,1,2] \\ _Charles R Greathouse IV_, Oct 19 2015 %o A085987 (Python) %o A085987 from math import isqrt %o A085987 from sympy import primepi, primerange, integer_nthroot %o A085987 def A085987(n): %o A085987 def bisection(f,kmin=0,kmax=1): %o A085987 while f(kmax) > kmax: kmax <<= 1 %o A085987 kmin = kmax >> 1 %o A085987 while kmax-kmin > 1: %o A085987 kmid = kmax+kmin>>1 %o A085987 if f(kmid) <= kmid: %o A085987 kmax = kmid %o A085987 else: %o A085987 kmin = kmid %o A085987 return kmax %o A085987 def f(x): return n+x+sum((t:=primepi(s:=isqrt(y:=x//r**2)))+(t*(t-1)>>1)-sum(primepi(y//k) for k in primerange(1, s+1)) for r in primerange(isqrt(x)+1))+sum(primepi(x//p**3) for p in primerange(integer_nthroot(x,3)[0]+1))-primepi(integer_nthroot(x,4)[0]) %o A085987 return bisection(f,n,n) # _Chai Wah Wu_, Mar 27 2025 %Y A085987 Cf. A001248, A006881, A030078, A054753, A007304, A050997, A046387, A036035, A086974. %Y A085987 Subsequence of A014613, A307341, A178212. %K A085987 nonn %O A085987 1,1 %A A085987 _Alford Arnold_, Jul 08 2003 %E A085987 More terms from _Reinhard Zumkeller_, Jul 25 2003