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 A096918 #19 Nov 03 2024 02:03:48 %S A096918 3,3,3,5,3,3,5,5,3,5,3,7,5,5,3,7,3,5,5,3,5,7,7,3,5,3,7,7,3,5,11,5,5,3, %T A096918 7,5,3,7,3,5,11,7,7,3,7,5,11,3,11,5,7,5,3,13,7,5,5,3,7,13,3,11,7,5,3, %U A096918 5,11,7,3,5,7,13,7,3,7,5,5,3,11,11,3,5,17,7,3,7,13,7,5,3,11,5,5,11,5 %N A096918 Intermediate prime factor of n-th product of 3 distinct primes. %H A096918 Amiram Eldar, <a href="/A096918/b096918.txt">Table of n, a(n) for n = 1..10000</a> %F A096918 A096917(n)*a(n)*A096919(n) = A007304(n). %F A096918 A096917(n) < a(n) < A096919(n). %t A096918 f[n_]:=Last/@FactorInteger[n]=={1,1,1};f1[n_]:=Min[First/@FactorInteger[n]];f2[n_]:=Max[First/@FactorInteger[n]];f3[n_]:=First/@FactorInteger[n][[2,1]];lst={};Do[If[f[n],AppendTo[lst,f3[n]]],{n,0,7!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Apr 10 2010 *) %o A096918 (Python) %o A096918 from math import isqrt %o A096918 from sympy import primepi, primerange, integer_nthroot, primefactors %o A096918 def A096918(n): %o A096918 def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1))) %o A096918 def bisection(f,kmin=0,kmax=1): %o A096918 while f(kmax) > kmax: kmax <<= 1 %o A096918 while kmax-kmin > 1: %o A096918 kmid = kmax+kmin>>1 %o A096918 if f(kmid) <= kmid: %o A096918 kmax = kmid %o A096918 else: %o A096918 kmin = kmid %o A096918 return kmax %o A096918 return sorted(primefactors(bisection(f)))[1] # _Chai Wah Wu_, Aug 30 2024 %Y A096918 Cf. A007304, A096917, A096919. %K A096918 nonn %O A096918 1,1 %A A096918 _Reinhard Zumkeller_, Jul 15 2004