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

A120033 Number of semiprimes s such that 2^n < s <= 2^(n+1).

Original entry on oeis.org

0, 1, 1, 4, 4, 12, 20, 40, 75, 147, 285, 535, 1062, 2006, 3918, 7548, 14595, 28293, 54761, 106452, 206421, 401522, 780966, 1520543, 2962226, 5777162, 11272279, 22009839, 43006972, 84077384, 164482781, 321944211, 630487562, 1235382703
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_2(2^n) = A125527(n).

Examples

			(2^2, 2^3] there is one semiprime, namely 6. 4 was counted in the previous entry.
		

Crossrefs

Programs

A126279 Triangle read by rows: T(k,n) is number of numbers <= 2^n that are products of k primes.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 6, 6, 2, 1, 11, 10, 7, 2, 1, 18, 22, 13, 7, 2, 1, 31, 42, 30, 14, 7, 2, 1, 54, 82, 60, 34, 15, 7, 2, 1, 97, 157, 125, 71, 36, 15, 7, 2, 1, 172, 304, 256, 152, 77, 37, 15, 7, 2, 1, 309, 589, 513, 325, 168, 81, 37, 15, 7, 2, 1, 564, 1124, 1049, 669, 367, 177, 83, 37
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins:
  1
  2 1
  4 2 1
  6 6 2 1
  11 10 7 2 1
  18 22 13 7 2 1
  31 42 30 14 7 2 1
  54 82 60 34 15 7 2 1
  97 157 125 71 36 15 7 2 1
  172 304 256 152 77 37 15 7 2 1
		

References

  • Adolf Hildebrand, On the number of prime factors of an integer. Ramanujan revisited (Urbana-Champaign, Ill., 1987), 167 - 185, Academic Press, Boston, MA, 1988.
  • Edmund Georg Hermann Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea Publishing, NY 1953, pp. 205 - 211.

Crossrefs

First column: A007053, second column: A125527, third column: A127396, 4th column: A334069. The last row reversed: A052130; the n-th row's sum: A000225 = 2^n -1.
Cf. A126280: same array but for powers of ten.

Programs

  • Mathematica
    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 *)
    Table[ AlmostPrimePi[m, 2^n], {n, 16}, {m, n}] // Flatten

A127396 Number of 3-almostprimes <= 2^n.

Original entry on oeis.org

0, 0, 1, 2, 7, 13, 30, 60, 125, 256, 513, 1049, 2082, 4214, 8401, 16771, 33427, 66550, 132405, 262865, 522296, 1036033, 2055256, 4075039, 8078110, 16008485, 31720903, 62847087, 124501149, 246638355, 488559079, 967785236, 1917099175, 3797688543
Offset: 1

Views

Author

Robert G. Wilson v, Dec 29 2006

Keywords

Crossrefs

Programs

  • Mathematica
    ThreeAlmostPrimePi[n_] := Sum[PrimePi[n/(Prime@i*Prime@j)] - j + 1, {i, PrimePi[n^(1/3)]}, {j, i, PrimePi[Sqrt[n/Prime@i]]}]; Table[ ThreeAlmostPrimePi[2^n], {n, 30}]

Formula

a(n) = A072114(2^n). - R. J. Mathar, Aug 26 2011

A146168 Number of odd squarefree semiprimes (A046388) < 2^n.

Original entry on oeis.org

0, 0, 0, 1, 2, 8, 20, 46, 96, 197, 404, 798, 1599, 3134, 6169, 12093, 23640, 46199, 90180, 176198, 343927, 671783, 1312304, 2564485, 5012807, 9803883, 19181677, 37545265, 73524262, 144038812, 282313035, 553557959, 1085860455, 2130904274, 4183364732, 8215861037
Offset: 1

Views

Author

Washington Bomfim, Oct 27 2008

Keywords

Examples

			a(5) = 2. The odd squarefree semiprimes less than 2^5 are 15 and 21. The formula gives 10 - pi(5) - pi(2^4) + 1 = 2.
		

Crossrefs

Cf. A046388, A001358 (semiprimes), A000720 (pi(n), the number of primes <= n), A007053 (number of primes <= 2^n), A060967, A125527 (number of semiprimes <= 2^n).

Programs

  • Mathematica
    Table[lim=2^n; Sum[PrimePi[lim/p]-PrimePi[p], {p, Prime[Range[2,PrimePi[Sqrt[lim]]]]}], {n,20}]

Formula

a(n) = A125527(n) - A060967(n) - A007053(n-1) + 1, for n > 1.

Extensions

a(34) onwards from Amiram Eldar, Sep 05 2024

A334069 Number of numbers <= 2^n that are the product of exactly four primes, not necessarily distinct.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 14, 34, 71, 152, 325, 669, 1405, 2866, 5931, 12139, 24782, 50444, 102458, 207945, 420511, 850518, 1716168, 3460304, 6968639, 14022029, 28189833, 56631732, 113697179, 228115641, 457456902, 916899721, 1836996851, 3678943569, 7365141297, 14740076678, 29490954290
Offset: 1

Views

Author

Robert G. Wilson v, Apr 13 2020

Keywords

Examples

			a(6) = 7 because
  16 = 2 * 2 * 2 * 2,
  24 = 2 * 2 * 2 * 3,
  36 = 2 * 2 * 3 * 3,
  40 = 2 * 2 * 2 * 5,
  54 = 2 * 3 * 3 * 3,
  56 = 2 * 2 * 2 * 7, and
  60 = 2 * 2 * 3 * 5
are the seven numbers less than 2^6 = 64 that are each the product of four primes.
		

Crossrefs

Partial sums of A120035.

Programs

  • Mathematica
    FourAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k)] - k + 1, {i, PrimePi[n^(1/4)]}, {j, i, PrimePi[(n/Prime@i)^(1/3)]}, {k, j, PrimePi@Sqrt[n/(Prime@i*Prime@j)]}]; Array[FourAlmostPrimePi[2^#] &, 37]

Formula

a(n) = A082996(2^n).

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.

A259172 Numbers in A259145 that are neither prime nor semiprime.

Original entry on oeis.org

561, 595, 1105, 1235, 1245, 1495, 1547, 1885, 2405, 2555, 2717, 2849, 3115, 3495, 3655, 3657, 3689, 3815, 4521, 4795, 4945, 5035, 5385, 5395, 5453, 5457, 5709, 5865, 6083, 6141, 6251, 6285, 6365, 6391, 6501, 6695, 6755, 6969, 7021, 7887, 8113, 8255, 8355
Offset: 1

Views

Author

Keywords

Comments

Regarding the distribution: Let K be the union of primes and semiprimes in A259145. Let S be the set of other terms. The growth rate of the cardinality of S with respect to the cardinality of K is significantly slower. For instance, if we take the first 50000 terms of A259145, about 32.5 percent are contained in S. If we take the first 350000 terms, about 38.2 percent are contained in S.
a(n) that are in A002997 (Carmichael numbers) for a(n) <= 10^6 are 561, 1105, 8911, 10585, 29341, 825265.
a(n) that are in A051015 (Zeisel numbers) for a(n) <= 3*10^6 are 1885, 353977, 2953711.

Crossrefs

Subsequence of A000469, A033942, A050384 (conjuctered).

Programs

  • Mathematica
    Select[Range[25000], PrimeQ[#^2 - EulerPhi[#]] && PrimeNu[#] > 2 &]

Formula

A001221(a(n)) > 2.
A000005(a(n)) = 2^k, k >= 3.

A362042 Number of odd semiprimes less than 2^n.

Original entry on oeis.org

0, 0, 0, 0, 2, 4, 11, 24, 51, 103, 207, 417, 815, 1622, 3164, 6210, 12146, 23711, 46295, 90307, 176369, 344155, 672091, 1312721, 2565048, 5013566, 9804910, 19183069, 37547164, 73526846, 144042323, 282317826, 553564500, 1085869406, 2130916524, 4183381508, 8215884036
Offset: 0

Views

Author

Sidney Cadot, Apr 15 2023

Keywords

Comments

Odd numbers with two prime factors are used as the modulus in the RSA algorithm. This sequence shows the growth of the number of 'candidate' RSA moduli for keys up to a given number of bits.

Examples

			For n=5, there are four integers less than 32 (i.e., 2^5) that are the product of two odd primes: {3*3, 3*5, 3*7, 5*5} = {9, 15, 21, 25}; hence, a(5)=4.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length@Select[Range[1, 2^n - 1, 2], Total[Last /@ FactorInteger[#]] == 2 &]
    Table[a[n],{n,0,24}]

Formula

a(n) = A125527(n) - A007053(n-1) for n > 0. - Jinyuan Wang, Apr 16 2023

Extensions

More terms from Jinyuan Wang, Apr 16 2023

A146169 Percentage (rounded) of semiprimes <= 2^n which are odd and squarefree.

Original entry on oeis.org

0, 0, 17, 20, 36, 48, 56, 61, 65, 69, 71, 73, 75, 76, 77, 78, 79, 80, 80, 81, 81, 82, 82, 82, 83, 83, 83, 83, 84, 84, 84, 84
Offset: 2

Views

Author

Washington Bomfim, Oct 27 2008

Keywords

Comments

More than 84% of the semiprimes in the interval [4, 2^32] are odd and squarefree. This percentage appears to rise indefinitely as n grows.
a(n) = 100 for all n > N. What is the least such N? - Charles R Greathouse IV, May 12 2013

Examples

			a(5)= 20 since the interval [4, 2^5] contains 10 semiprimes, namely 4,6,9,10,14,15,21,22,25 and 26; and two of those semiprimes, (15 and 21), are odd and squarefree.
		

Crossrefs

Cf. A001358(semiprimes), A125527(Number of semiprimes <= 2^n), A146168(Number of odd squarefree semiprimes < 2^n).

Programs

  • PARI
    a(n)=my(s,i,N=2^n); forprime(p=2, sqrtint(N), s+=primepi(N\p); i++); s-=i*(i-1)/2; i=primepi(sqrtint(N))+primepi(N/2)-1; round(100*(s-i)/s) \\ Charles R Greathouse IV, May 12 2013

Formula

a(n) = round(A146168(n)/A125527(n)*100)
Showing 1-9 of 9 results.