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.

Showing 1-3 of 3 results.

A276176 Consider the race between primes, semiprimes, 3-almost primes, ... k-almost primes; sequence indicates when one overtakes another to give a new race leader.

Original entry on oeis.org

2, 26, 31, 34, 15526, 151165506068, 151165506073, 151165506089, 151165506093, 151165506295, 151165506410, 151165506518, 151165506526, 151165506658, 151165506665, 151165506711, 151165506819, 151165506970, 151165506994, 151165507256, 151165507259, 151165507265
Offset: 1

Views

Author

Keywords

Comments

A "k-almost prime" is a number which is the product of exactly k primes.
Let pi_k(n) be the number of k-almost primes less than or equal to n. In 1909, on page 211 of the Handbuch, Edmund G. H. Landau stated that pi_k(n) ~ (n/log n)*(log log n^(k-1))/(k-1)! for all k >= 0.
Because of this fact, eventually the semiprimes will outnumber the primes; they do starting at 34. Likewise the 3-almost primes will outnumber the semiprimes and they do starting at 15526.
The terms from a(6) = 151165506068 to a(170) = 151165607026 correspond to counts of 4-almost and 3-almost primes overtaking each other multiple times. - Giovanni Resta, Aug 17 2018

Examples

			a(1) = 2 since beginning with the natural numbers (A000027) the race is even with no group in the lead. But at 2, we encounter our first member (1 is unity and is not a member of any group here) which is a prime and therefore the primes take the lead with 2.
a(2) = 34 which is a semiprime. pi_1(34) = 11 and pi_2(34) = 12. This is the first time that the semiprimes overtake the primes.
		

References

  • Edmund Georg Hermann Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, or Chelsea Publishing, NY 1953, or Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York 1974.

Crossrefs

Cf. A243906, A273381, A274123, A358677, A359242 (restricted to squarefree numbers).

Programs

  • Mathematica
    k = 1; lst = {}; tf = 0; p1 = 0; p2 = 0; While[k < 100001, If[PrimeOmega@k == 1, p1++]; If[PrimeOmega@k == 2, p2++]; If[p1 > p2 && tf == 0, tf++; AppendTo[lst, k]]; If[p2 > p1 && tf == 1, tf--; AppendTo[lst, k]]; k++]; lst
    (* cross check using *) 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 *)
    (* as an example *) AlmostPrimePi[2, 15526] => 3986 whereas AlmostPrimePi[3, 15526] => 3987.

Formula

It seems plausible that 0.8 * log(A284411(m) - 1) <= log(a(n)) <= log(A284411(m)) in the instances where the overtaking concerns m-almost-primes and (m-1)-almost-primes. - Peter Munn, Aug 03 2023

Extensions

a(6)-a(22) from Giovanni Resta, Aug 17 2018
Name clarified by Peter Munn, Dec 31 2022

A243903 Numbers n such that (number of primes <= n) is greater than or equal to (number of semiprimes <= n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 29, 30, 31, 32, 33
Offset: 1

Views

Author

Harvey P. Dale, Jun 14 2014

Keywords

Comments

Conjecture: there are no additional terms.
We know from the asymptotic formulas (see Landau) that the sequence is finite. See also the graph of A243906. - N. J. A. Sloane, Jun 14 2014

References

  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1, Teubner, Leipzig, 1909; third edition : Chelsea, New York (1974).

Crossrefs

Programs

  • Mathematica
    With[{nn=5000},Flatten[Position[Thread[{Accumulate[Table[ If[ PrimeOmega[n] == 2,1,0],{n,nn}]],PrimePi[Range[nn]]}],_?(Last[#]>=First[#]&),{1}, Heads-> False]]]

A378764 Sum of the semiprimes which are less than or equal to n minus the sum of the primes which are less than or equal to n.

Original entry on oeis.org

0, -2, -5, -1, -6, 0, -7, -7, 2, 12, 1, 1, -12, 2, 17, 17, 0, 0, -19, -19, 2, 24, 1, 1, 26, 52, 52, 52, 23, 23, -8, -8, 25, 59, 94, 94, 57, 95, 134, 134, 93, 93, 50, 50, 50, 96, 49, 49, 98, 98, 149, 149, 96, 96, 151, 151, 208, 266, 207, 207, 146, 208, 208, 208, 273, 273, 206, 206, 275, 275
Offset: 1

Views

Author

Robert G. Wilson v and Luca Bencini-Tibo, Dec 20 2024

Keywords

Comments

After a(32), a(n) always exceeds 0. See A243906(32).

Examples

			a(6) = 0, because (4+6) - (2+3+5) = 0.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Plus @@ Select[ Range@ n, PrimeOmega@ # == 2 &] - Plus @@ Select[ Range@ n, PrimeOmega@ # == 1 &]; Array[a, 70]
  • PARI
    a(n) = my(vf=apply(factor, [1..n])); vecsum(Vec(select(x->(bigomega(x)==2), vf, 1))) - vecsum(Vec(select(x->(bigomega(x)==1), vf, 1))); \\ Michel Marcus, Dec 28 2024
Showing 1-3 of 3 results.