cp's OEIS Frontend

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.

A117526 Least number a(n) which is a product of n primes and such that Pi_n(a(n))/a(n) is maximum.

This page as a plain text file.
%I A117526 #17 Feb 16 2025 08:33:00
%S A117526 3,10,9837,259441550133
%N A117526 Least number a(n) which is a product of n primes and such that Pi_n(a(n))/a(n) is maximum.
%C A117526 Pi_n(a(n))/a(n): 0.66667, 0.40000, 0.25801, 0.2145967653
%C A117526 3=3, 10=2*5, 9837=3*3*1093 & 259441550133=3*89*311*3124409.
%C A117526 3 is the second prime, 10 is the fourth semiprime, 9837 is the 3-almost prime, and 259441550133 is the 4-almost prime.
%H A117526 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AlmostPrime.html">Almost Prime.</a>
%H A117526 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeFactor.html">Prime Factor.</a>
%e A117526 a(1)=3 because Pi(2)/2=1/2 < Pi(3)/3=2/3 > Pi(5)/5=3/5.
%e A117526 a(2)=10 because Pi_2(9)/9=1/3 < Pi_2(10)/10=2/5 > Pi_2(14)/14=5/14; Pi_2(10)/10 = Pi_2(15)/15 but 10 < 15.
%t A117526 AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* _Eric W. Weisstein_, Feb 07 2006 *)
%t A117526 fQ[n_] := Plus @@ Last /@ FactorInteger@n == 4; c = r = 0; Do[If[fQ@n, c++ ]; If[c/n > r, Print[n]; r = c/n], {n, 10^6}]
%Y A117526 Cf. A006880, A066265, A109251, A114106, A114453.
%K A117526 nonn
%O A117526 1,1
%A A117526 _Martin Raab_ and _Robert G. Wilson v_, Mar 25 2006
%E A117526 Comment edited and a(4) added by _Donovan Johnson_, Mar 10 2010