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 21-30 of 34 results. Next

A373630 a(n) is the n-th semiprime after the n-th prime.

Original entry on oeis.org

4, 6, 10, 15, 25, 26, 35, 38, 49, 57, 58, 74, 85, 86, 91, 95, 118, 119, 123, 133, 134, 143, 146, 161, 183, 185, 187, 201, 202, 205, 218, 221, 237, 247, 265, 267, 278, 295, 299, 302, 309, 314, 326, 327, 334, 335, 362, 393, 395, 398, 403, 413, 415, 427, 446, 453, 466, 469, 473, 481, 482, 497, 519
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Jun 11 2024

Keywords

Examples

			a(5) = 25 because the 5th prime is 11 and the first 5 semiprimes > 11 are 14,15,21,22,25.
		

Crossrefs

Programs

  • Maple
    N:= 10^4: # for terms <= N
    P:= select(isprime,[2,seq(i,i=3..N,2)]):
    S:= select(t -> numtheory:-bigomega(t)=2, [$1..N]): nS:= nops(S):
    f:= proc(n) local j;
      j:= ListTools:-BinaryPlace(S,P[n]);
      if j + n <= nS then S[j+n] else fail fi
    end proc:
    R:= NULL:
    for i from 1 do
      v:= f(i);
      if v = fail then break fi;
      R:= R,v
    od:
    R;
  • Mathematica
    seq={};Do[i=Prime[n]+1;cnt=0;While[cntJames C. McMahon, Jun 15 2024 *)
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A373630(n):
        p = prime(n)
        q = n+int(sum(primepi(p//prime(k))-k+1 for k in range(1,primepi(isqrt(p))+1)))
        def f(x): return int(q+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = q, f(q)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) = A001358(n + A072000(A000040(n))).

A101041 Number of numbers not greater than n having no more than two prime factors.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 28 2004

Keywords

Comments

a(n) = 1 + Sum_{k=1..n} A101040(k);
asymptotically: a(n) ~ n*log(log(n))/log(n).
Primes counted with multiplicity. - Harvey P. Dale, Feb 16 2024

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[PrimeOmega[n]<3,1,0],{n,80}]] (* Harvey P. Dale, Feb 16 2024 *)

Formula

a(n) = A000720(n) + A072000(n) + 1.

A140234 Sum of the semiprimes <= n.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 10, 10, 10, 19, 29, 29, 29, 29, 43, 58, 58, 58, 58, 58, 58, 79, 101, 101, 101, 126, 152, 152, 152, 152, 152, 152, 152, 185, 219, 254, 254, 254, 292, 331, 331, 331, 331, 331, 331, 331, 377, 377, 377, 426, 426, 477, 477, 477, 477, 532, 532, 589
Offset: 0

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A034387 is to primes A000040. From the prime number theorem A034387(n) has the asymptotic expression: a(n) ~ n^2 / (2 log n), so what is the asymptotic expression for a(n)?

Crossrefs

Programs

  • Mathematica
    a[n_]:=Total[Select[Range[n],PrimeOmega[#]==2&]];Array[a,58,0] (* James C. McMahon, Jul 06 2025 *)

Formula

a(n) = Sum_{j such that j is in A001358 and j<=n} = A062198(A072000(n)).

A140235 Partial sum of non-semiprimes A100959.

Original entry on oeis.org

1, 3, 6, 11, 18, 26, 37, 49, 62, 78, 95, 113, 132, 152, 175, 199, 226, 254, 283, 313, 344, 376, 412, 449, 489, 530, 572, 615, 659, 704, 751, 799, 849, 901, 954, 1008, 1064, 1123, 1183, 1244, 1307, 1371, 1437, 1504, 1572, 1642, 1713, 1785, 1858, 1933, 2009
Offset: 1

Views

Author

Jonathan Vos Post, May 13 2008

Keywords

Comments

This is to semiprimes A001358 as A051352 is to primes A000040. Equivalently, this is to non-semiprimes A100959 as A051349 is to nonprimes A018252.

Examples

			a(5) = 18 = 1 + 2 + 3 + 5 + 7.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Range[100],PrimeOmega[#]!=2&]] (* Harvey P. Dale, Aug 22 2021 *)

Formula

a(n) = Sum{k=1..n} A100959(k).

Extensions

Corrected and edited by Giovanni Resta, Jun 20 2016

A175613 Number of semiprimes <= 2^prime(n).

Original entry on oeis.org

1, 2, 10, 42, 589, 2186, 30253, 113307, 1608668, 88157689, 336717854, 19015826478, 282528883551, 1091574618496, 16360940729894
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 04 2010

Keywords

Examples

			a(2)=2 because first 2 semiprimes are 4, 6 both <2^prime(2)=8.
		

Crossrefs

Cf. A001358, A007053, a proper subset of A125527.

Programs

  • Mathematica
    (* First run program given in A072000 to define the SemiPrimePi function *) Table[SemiPrimePi[2^Prime[n]], {n, 10}](* Alonso del Arte, Dec 10 2010 *)
  • PARI
    a(n)=my(N=2^prime(n),s,i); forprime(p=2, sqrtint(N), s+=primepi(N\p); i++); s - i * (i-1)/2 \\ Charles R Greathouse IV, Apr 25 2016
    
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A175613(n):
        m = 1<Chai Wah Wu, Jul 23 2024

Formula

a(n) = A072000(A034785(n)) = A125527(A000040(n)). - R. J. Mathar, Dec 10 2010

Extensions

a(14) & a(15) from Robert G. Wilson v, Oct 19 2011.

A186637 Semiprime powers with special exponents: k^(j-1) where both j and k are arbitrary semiprime numbers.

Original entry on oeis.org

64, 216, 729, 1000, 1024, 2744, 3375, 7776, 9261, 10648, 15625, 17576, 35937, 39304, 42875, 54872, 59049, 59319, 65536, 97336, 100000, 117649, 132651, 166375, 185193, 195112, 238328, 262144, 274625, 328509, 405224, 456533, 537824, 551368, 614125, 636056, 658503, 753571, 759375, 804357, 830584, 857375
Offset: 1

Views

Author

Jonathan Vos Post, Feb 24 2011

Keywords

Comments

Semiprime analog of A036454: prime powers with special exponents: q^(p-1) where both p and q are arbitrary prime numbers.

Examples

			a(1) = smallest semiprime to power of (smallest semiprime - 1) = 4^(4-1) = 4^3 = 64.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, factorint
    def A186637(n):
        def A072000(n): return int(-((t:=primepi(s:=isqrt(n)))*(t-1)>>1)+sum(primepi(n//p) for p in primerange(s+1)))
        def f(x): return int(n+x-sum(A072000(integer_nthroot(x, p-1)[0]) for p in range(4,x.bit_length()+1) if sum(factorint(p).values())==2))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 12 2024

Formula

{a(n)} = {A001358(i) ^ A186621(j)}.
{a(n)} = {a^b where a and b are elements of A001358} = {(p*q)^((r*s)-1) for primes p, q, r, s, not necessarily distinct}.

A192394 Number of semiprimes in the range (prime(n), prime(n)+sqrt(prime(n))).

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 29 2011

Keywords

Examples

			a(1)=0 because there are no semiprimes in the range (2, 2+sqrt(2));
a(2)=1 because there is one semiprime (4) in the range (3, 3+sqrt(3)).
		

Crossrefs

Cf. A001358.

Programs

Extensions

Corrected by R. J. Mathar, Jul 01 2011

A216593 Number of semiprimes among n-th million natural numbers.

Original entry on oeis.org

210035, 197249, 193162, 190540, 188288, 187308, 185657, 184788, 183856, 183441, 182123, 181556, 181125, 180878, 180234, 179649, 179055, 178710, 178652, 178034, 178015, 177307, 177391, 177003, 176568, 176419, 176021, 175788, 175655, 175189, 174915, 175357
Offset: 1

Views

Author

Zak Seidov, Sep 09 2012

Keywords

Comments

Let f(m) = number of semiprimes
a(n) = 0 for almost all n. It seems infeasible to find the first such n. - Charles R Greathouse IV, Sep 09 2012

Crossrefs

Programs

  • Mathematica
    f[m_] := Sum[ PrimePi[(m - 1)/Prime[i]], {i, PrimePi[ Sqrt[m]]}] - Binomial[ PrimePi[ Sqrt[m]], 2]; ta=Table[f[n*10^6],{n,0,1000}];s=Rest[ta]-Most[ta] (* for first 1000 terms *)
    (* using Mmca code by Robert G. Wilson v in A066265 - Zak Seidov, Sep 09 2012 *)
  • PARI
    a(n)=sum(k=10^6*(n-1),10^6*n,bigomega(k)==2) \\ Charles R Greathouse IV, Sep 09 2012

Formula

a(n) ~ 1000000 n log log n / log n. - Charles R Greathouse IV, Sep 23 2012

A217908 Semiprime powers of distinct semiprimes.

Original entry on oeis.org

1296, 4096, 6561, 10000, 38416, 50625, 194481, 234256, 262144, 390625, 456976, 531441, 1000000, 1048576, 1185921, 1336336, 1500625, 2085136, 2313441, 4477456, 5764801, 6765201, 7529536, 9150625, 10077696, 10556001, 11316496, 11390625, 14776336, 17850625
Offset: 1

Keywords

Comments

Subset of A113877.

Examples

			6561=9^4, and 9 and 4 are both semiprime. 46656 = 6^6 is excluded because the semiprimes are not distinct.
		

Crossrefs

Cf. A113877.

Programs

  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, factorint
    def A217908(n):
        def A072000(n): return int(-((t:=primepi(s:=isqrt(n)))*(t-1)>>1)+sum(primepi(n//p) for p in primerange(s+1)))
        def f(x): return int(n+x-sum(A072000(integer_nthroot(x, p)[0])-(p**p<=x) for p in range(4,x.bit_length()) if sum(factorint(p).values())==2))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 12 2024

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

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]]]
Previous Showing 21-30 of 34 results. Next