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.

Previous Showing 11-20 of 34 results. Next

A072114 Number of 3-almost primes (A014612) <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16, 16, 16, 16, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19
Offset: 0

Views

Author

Benoit Cloitre, Jun 19 2002

Keywords

Comments

Number of k <= n such that bigomega(k) = 3.
Let A be a positive integer then card{ x <= n : bigomega(x) = A } ~ (n/Log(n))*Log(Log(n))^(A-1)/(A-1)!. For which n, card{ x <= n : bigomega(x) = 3 } >= card{ x <= n : bigomega(x) = 2 } ?
15530 is the first number for which there are more 3-almost primes than 2-almost primes. See A125149.

References

  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1, Teubner, Leipzig; third edition : Chelsea, New York (1974).
  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Partial sums of A101605.
Cf. A125149.

Programs

  • Mathematica
    Table[Sum[KroneckerDelta[PrimeOmega[i], 3], {i, n}], {n, 0, 50}] (* Wesley Ivan Hurt, Oct 07 2014 *)
  • PARI
    for(n=1,100,print1(sum(i=1,n,bigomega(i)==3),","))
    
  • PARI
    a(n)=my(j,s);forprime(p=2,(n+.5)^(1/3),j=primepi(p)-2;forprime(q=p,sqrtint(n\p),s+=primepi(n\(p*q))-j++));s \\ Charles R Greathouse IV, Mar 21 2012
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A072114(n): return int(sum(primepi(n//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(n,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(n//k)+1),a))) # Chai Wah Wu, Aug 17 2024

Formula

a(n) = card{ x <= n : bigomega(x) = 3 }, asymptotically : a(n) ~ (n/log(n))*log(log(n))^2/2 [Landau, p. 211].

A082997 a(n) = card{ x <= n : omega(x) = 2 }.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 14, 15, 16, 16, 17, 18, 19, 19, 19, 19, 20, 21, 22, 22, 23, 23, 24, 25, 26, 26, 27, 28, 29, 30, 31, 31, 31, 31, 32, 33, 33, 34, 34, 34, 35, 36, 36, 36, 37, 37, 38, 39, 40, 41
Offset: 1

Views

Author

Benoit Cloitre, May 30 2003

Keywords

References

  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Partial sums of A215480.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          a(n-1)+`if`(nops(ifactors(n)[2])=2, 1, 0))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 23 2021
  • Mathematica
    a[n_] := Count[PrimeNu[Range[n]], 2];
    Array[a, 100] (* Jean-François Alcover, Mar 02 2022 *)
  • PARI
    a(n)=sum(i=1,n,if(omega(i)-2,0,1))
    
  • PARI
    a(n) = my(s = sqrtint(n), p = 2, j = 1, count = 0); while(p <= s, my(r = nextprime(p+1)); my(t = p); while (t <= n, my(w = n\t); if(r > w, break); count += primepi(w) - j; my(r2 = r); while(r2 <= w, my(u = t*r2*r2); if(u > n, break); while (u <= n, count += 1; u *= r2); r2 = nextprime(r2+1)); t *= p); p = r; j += 1); count; \\ Daniel Suteu, Jul 21 2021
    
  • Python
    from sympy import factorint
    from itertools import accumulate
    def cond(n): return int(len(factorint(n))==2)
    def aupto(nn): return list(accumulate(map(cond, range(1, nn+1))))
    print(aupto(77)) # Michael S. Branicky, Jul 21 2021

Formula

a(n) ~ (n/log(n))*log(log(n)).
a(A007774(n)) = n. - Daniel Suteu, Jul 21 2021

A100951 Number of ways to write n = p*q + r with three distinct primes p, q and r.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 4, 0, 2, 0, 1, 1, 3, 0, 3, 2, 3, 1, 4, 0, 2, 2, 3, 2, 3, 0, 5, 4, 3, 2, 5, 0, 4, 3, 5, 4, 3, 1, 4, 3, 5, 4, 6, 1, 3, 4, 6, 6, 4, 0, 3, 7, 6, 5, 6, 1, 6, 6, 6, 4, 4, 3, 4, 7, 7, 6, 6, 2, 6, 7, 8, 8, 3, 2, 7, 6, 7, 8, 8, 1, 4, 7, 10, 10, 6, 6, 7, 10, 9, 8, 5, 5, 5, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 23 2004

Keywords

Comments

a(n)<=A100950(n)<=A100949(n)<=Min{A000720(n), A072000(n)}.
a(n) = A000040(i) + A006881(j) for some i and j, such that A000040(i) is not a factor of A006881(j);
a(A100952(n)) = 0.
a(A160373(n)) = n and a(m) <> n for m < A160373(n). [From Reinhard Zumkeller, May 11 2009]

Examples

			A100949(21) = #{7+2*7, 11+2*5, 17+2*2} = 3,
a(21) = #{11+2*5} = 1.
		

A072613 Number of numbers of the form p*q (p, q distinct primes) less than or equal to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 22
Offset: 1

Views

Author

Benoit Cloitre, Aug 11 2002

Keywords

Comments

There was an old comment here that said a(n) was equal to A070548(n) - 1, but this is false (e.g. at n=210). - N. J. A. Sloane, Sep 10 2008
Number of squarefree semiprimes not exceeding n. - Wesley Ivan Hurt, May 25 2015

Examples

			a(6) = 1 since 2*3 is the only number of the form p*q less than or equal to 6.
		

References

  • G. Tenenbaum, Introduction to Analytic and Probabilistic Number Theory, Cambridge Studies in Advanced Mathematics, 1995.

Crossrefs

Cf. A072000.
Partial sums of A280710.

Programs

  • Maple
    f:=proc(n) local c,i,j,p,q; c:=0; for i from 1 to n do p:=ithprime(i); if p^2 >= n then break; fi; for j from i+1 to n do q:=ithprime(j); if p*q > n then break; fi; c:=c+1; od: od; RETURN(c); end; # N. J. A. Sloane, Sep 10 2008
  • Mathematica
    fPi[n_] := Sum[ PrimePi[n/ Prime@i] - i, {i, PrimePi@ Sqrt@ n}]; Array[ fPi, 81] (* Robert G. Wilson v, Jul 22 2008 *)
    Accumulate[Table[If[PrimeOmega[n] MoebiusMu[n]^2 == 2, 1, 0], {n, 100}]] (* Wesley Ivan Hurt, Jun 01 2017 *)
    Accumulate[Table[If[SquareFreeQ[n]&&PrimeOmega[n]==2,1,0],{n,100}]] (* Harvey P. Dale, Aug 05 2019 *)
  • PARI
    a(n)=sum(k=1,n,if(abs(omega(k)-2)+(1-issquarefree(k)),0,1))
    
  • PARI
    a(n) = my(t=0,i=0); forprime(p = 2, sqrtint(n), i++; t+=primepi(n\p)); t-binomial(i+1,2) \\ David A. Corneth, Jun 02 2017
    
  • PARI
    upto(n) = {my(l=List(), res=[0, 0, 0, 0, 0], j=1, t=0); forprime(p = 2, n, forprime(q=nextprime(p+1), n\p, listput(l, p*q))); listsort(l); for(i=2, #l, t++;res=concat(res, vector(l[i]-l[i-1], j, t))); res} \\ David A. Corneth, Jun 02 2017
    
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A072613(n): return int(sum(primepi(n//prime(k))-k+1 for k in range(1,primepi(isqrt(n))+1))) - primepi(isqrt(n)) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = Sum_{pA000720, and the sum is over all primes less than sqrt(n). [N-E. Fahssi, Mar 05 2009]
Asymptotically a(n) ~ (n/log(n))log(log(n)) [G. Tenenbaum pp. 200--].
a(n) = Sum_{i<=n | Omega(i)=2} mu(i). - Wesley Ivan Hurt, Jan 05 2013, revised May 25 2015
a(n) = Sum_{i<=n | tau(i)=4} mu(i). - Wesley Ivan Hurt, May 25 2015

A205726 Number of semiprimes <= n^2.

Original entry on oeis.org

0, 1, 3, 6, 9, 13, 17, 22, 26, 34, 40, 48, 56, 62, 75, 82, 90, 103, 114, 126, 135, 149, 164, 179, 190, 202, 220, 236, 253, 270, 289, 304, 320, 340, 360, 381, 404, 425, 443, 462, 484, 508, 533, 556, 581, 604, 634, 655, 678, 709, 738, 761, 783, 813, 846, 881
Offset: 1

Views

Author

Keith Backman, Jan 30 2012

Keywords

Comments

See A205727 and A205728 for related sequences and relationship to Goldbach conjecture.

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nn = 100;  t = Select[Range[nn^2], SemiPrimeQ]; Table[Length[Select[t, # <= n^2 &]], {n, nn}] (* T. D. Noe, Jan 30 2012 *)
    Module[{nn=60,sp},sp=Accumulate[Table[If[PrimeOmega[n]==2,1,0],{n,nn^2}]];Table[sp[[i^2]],{i,nn}]] (* Harvey P. Dale, May 29 2014 *)
  • Python
    from sympy import prime, primepi
    def A205726(n): return int(sum(primepi(n**2//prime(k))-k+1 for k in range(1,primepi(n)+1))) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = A072000(A000290(n)). - Michel Marcus, Sep 02 2013

A243906 (Number of semiprimes <= n) - (number of primes <= n).

Original entry on oeis.org

0, -1, -2, -1, -2, -1, -2, -2, -1, 0, -1, -1, -2, -1, 0, 0, -1, -1, -2, -2, -1, 0, -1, -1, 0, 1, 1, 1, 0, 0, -1, -1, 0, 1, 2, 2, 1, 2, 3, 3, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3, 4, 5, 4, 4, 3, 4, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 3, 4, 4, 4, 5, 5, 4, 4, 4, 5, 4, 4, 5, 6, 7, 7, 6, 6, 7, 7, 8
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 2014

Keywords

Comments

We know from the asymptotic formulas (see Landau) that the sequence is almost always positive.

References

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

Crossrefs

Programs

  • Maple
    g:= proc(n) if isprime(n) then -1 elif numtheory:-bigomega(n) = 2 then 1 else 0 fi end proc:
    ListTools:-PartialSums(map(g, [$1..100])); # Robert Israel, Dec 20 2022
  • Mathematica
    Accumulate[Table[Which[PrimeQ[n],-1,PrimeOmega[n]==2,1,True,0],{n,1000}]] (* Harvey P. Dale, Jun 15 2014 *)
  • PARI
    a(n) = #select(x->(bigomega(x) == 2), [1..n]) - primepi(n); \\ Michel Marcus, Dec 20 2022
    
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A243906(n): return int(sum(primepi(n//prime(k))-k+1 for k in range(1,primepi(isqrt(n))+1)))-primepi(n) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = A072000(n) - A000720(n). - Michel Marcus, Dec 20 2022

A082996 a(n) = card{ x <= n : bigomega(x) = 4 }.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
Offset: 1

Views

Author

Benoit Cloitre, May 30 2003

Keywords

Crossrefs

Partial sums of A101637.

Programs

  • PARI
    a(n)=sum(i=1,n,bigomega(i)==4)
    
  • PARI
    a(n)=my(j,s);forprime(p=2,(n+.5)^(1/4),forprime(q=p,(n/p+.5)^(1/3),j=primepi(q)-2;forprime(r=q,sqrtint(n\(p*q)),s+=primepi(n\(p*q*r))-j++)));s \\ Charles R Greathouse IV, Mar 21 2012
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A082996(n): return int(sum(primepi(n//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(n,4)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(n//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(n//(k*m))+1),b))) # Chai Wah Wu, Mar 29 2025

Formula

a(n) ~ (1/6)*(n/log(n))*log(log(n))^3.

A082998 a(n) = card{ x <= n : omega(x) = 3 }.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10
Offset: 1

Views

Author

Benoit Cloitre, May 30 2003

Keywords

References

  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Programs

  • PARI
    a(n)=sum(i=1,n,if(omega(i)-3,0,1))
    
  • PARI
    a(n, k = 3, m = 1, p = 2, s = sqrtnint(n\m, k), j = 1) = my(count = 0); if (k==2, while(p <= s, my(r = nextprime(p+1)); my(t = m*p); while (t <= n, my(w = n\t); if(r > w, break); count += primepi(w) - j; my(r2 = r); while(r2 <= w, my(u = t*r2*r2); if(u > n, break); while (u <= n, count += 1; u *= r2); r2 = nextprime(r2+1)); t *= p); p = r; j += 1); return(count)); while(p <= s, my(r = nextprime(p+1)); my(t = m*p); while(t <= n, my(s = sqrtnint(n\t, k-1)); if(r > s, break); count += a(n, k-1, t, r, s, j+1); t *= p); p = r; j += 1); count; \\ Daniel Suteu, Jul 21 2021
    
  • Python
    from sympy import factorint
    from itertools import accumulate
    def cond(n): return int(len(factorint(n))==3)
    def aupto(nn): return list(accumulate(map(cond, range(1, nn+1))))
    print(aupto(105)) # Michael S. Branicky, Jul 21 2021

Formula

a(n) ~ (1/2)*(n/log(n))*log(log(n))^2.
a(A033992(n)) = n. - Daniel Suteu, Jul 21 2021

A100950 Number of partitions of n into a coprime pair of a prime and a semiprime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 1, 1, 1, 5, 0, 2, 1, 2, 2, 4, 0, 3, 3, 5, 3, 4, 0, 2, 4, 4, 2, 4, 1, 5, 6, 3, 3, 6, 1, 4, 4, 6, 5, 4, 2, 4, 4, 7, 6, 6, 3, 3, 6, 7, 6, 4, 1, 3, 10, 7, 5, 7, 3, 6, 9, 6, 5, 5, 5, 4, 7, 8, 7, 7, 4, 6, 9, 8, 9, 4, 3, 7, 8, 8, 9, 8, 2, 4, 10, 11, 10, 6, 8, 7, 12, 9, 8, 6, 6, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 23 2004

Keywords

Comments

A100951(n)<=a(n)<=A100949(n)<=Min{A000720(n), A072000(n)}.
a(n) = A000040(i) + A001358(j) for some i and j, such that A000040(i) is not a factor of A001358(j).

Examples

			A100949(21) = #{7+2*7, 11+2*5, 17+2*2} = 3,
a(21) = #{11+2*5, 17+2*2} = 2.
		

A146167 Number of odd squarefree semiprimes (A046388) <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11
Offset: 1

Views

Author

Washington Bomfim, Oct 27 2008

Keywords

Comments

A346622 is a different although very similar sequence. - N. J. A. Sloane, Aug 23 2021

Examples

			a(33)= 3. The semiprimes <=33 are 15, 21 and 33. Formula gives 11-pi(5)-pi(16)+1 = 3.
		

Crossrefs

Cf. A046388, A001358 (semiprimes), A072000 (Number of semiprimes <= n), A000720 (pi(n), the number of primes <= n).
Cf. also A346622.

Programs

  • Mathematica
    Accumulate[Table[If[OddQ[n]&&SquareFreeQ[n]&&PrimeOmega[n]==2,1,0],{n,0,100}]] (* Harvey P. Dale, Feb 08 2016 *)
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A146167(n): return int(sum(primepi(n//prime(k))-k+1 for k in range(2,primepi(isqrt(n))+1)))-primepi(isqrt(n))+1 if n>3 else 0 # Chai Wah Wu, Jul 23 2024

Formula

a(n) = A072000(n) - A000720(floor(sqrt(n))) - A000720(floor(n/2)) + 1.
Previous Showing 11-20 of 34 results. Next