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-2 of 2 results.

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

A205727 Number of odd semiprimes <= n^2.

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 8, 11, 14, 19, 23, 28, 33, 37, 46, 51, 56, 66, 73, 80, 88, 96, 108, 118, 126, 134, 148, 159, 172, 183, 197, 207, 220, 234, 249, 263, 280, 297, 309, 323, 338, 356, 376, 393, 412, 427, 449, 465, 482, 505, 527, 544, 561, 582, 606, 634, 658
Offset: 1

Views

Author

Keith Backman, Jan 30 2012

Keywords

Comments

The Goldbach conjecture being true would imply that for every integer j, there exists at least one integer k such that (j^2)-(k^2) is an odd semiprime; i.e., for 2j=p+q, j=(p+q)/2 and k=(p-q)/2 results in (j^2)-(k^2)=pq. [Note that in many cases, 2j can be expressed as the sum of more than one set of two primes.] See A205728 for related series where p must be distinct from q.

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])];nn = 100;  t = Select[Range[1, nn^2, 2], SemiPrimeQ]; Table[Length[Select[t, # <= n^2 &]], {n, nn}] (* T. D. Noe, Jan 30 2012 *)
    With[{osp=Table[{n,PrimeOmega[n]},{n,1,10001,2}]},Table[ Count[ Select[ osp,#[[1]]<=k^2&],?(#[[2]]==2&)],{k,60}]] (* _Harvey P. Dale, Dec 29 2017 *)
  • PARI
    a(n) = sum(k=1, n^2, (k%2) && (bigomega(k) == 2)); \\ Michel Marcus, Feb 24 2018
Showing 1-2 of 2 results.