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-10 of 14 results. Next

A120043 Number of 12-almost primes 12ap such that 2^n < 12ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 103, 234, 492, 1082, 2271, 4867, 10349, 21794, 45907, 96293, 202006, 421287, 879388, 1828931, 3800227, 7882784, 16325796, 33771056, 69767214, 143971956, 296771231, 611156696, 1257374970
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_12(2^n).

Examples

			(2^12, 2^13] there is one semiprime, namely 6144. 4096 was counted in the previous entry.
		

Crossrefs

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 *)
    t = Table[AlmostPrimePi[12, 2^n], {n, 0, 30}]; Rest@t - Most@t
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A120043(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def almostprimepi(n,k): return int(sum(primepi(n//prod(c[1] for c in a))-a[-1][0] for a in g(n,0,1,1,k)) if k>1 else primepi(n))
        return -almostprimepi(m:=1<Chai Wah Wu, Aug 31 2024

A120035 Number of 4-almost primes f such that 2^n < f <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 1, 1, 5, 7, 20, 37, 81, 173, 344, 736, 1461, 3065, 6208, 12643, 25662, 52014, 105487, 212566, 430007, 865650, 1744136, 3508335, 7053390, 14167804, 28441899, 57065447, 114418462, 229341261, 459442819, 920097130, 1841946718, 3686197728
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_4(2^n) = A334069(n).

Examples

			(2^4, 2^5] there is one semiprime, namely 24. 16 was counted in the previous entry.
		

Crossrefs

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)]}]; t = Table[ FourAlmostPrimePi[2^n], {n, 0, 37}]; Rest@t - Most@t
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A120035(n):
        x = 1<Chai Wah Wu, Mar 28 2025

A125527 Number of semiprimes <= 2^n.

Original entry on oeis.org

0, 1, 2, 6, 10, 22, 42, 82, 157, 304, 589, 1124, 2186, 4192, 8110, 15658, 30253, 58546, 113307, 219759, 426180, 827702, 1608668, 3129211, 6091437, 11868599, 23140878, 45150717, 88157689, 172235073, 336717854, 658662065, 1289149627, 2524532330
Offset: 1

Views

Author

Robert G. Wilson v, Dec 29 2006

Keywords

Crossrefs

Programs

  • Mathematica
    SemiPrimePi[n_] := Sum[ PrimePi[ n/Prime@i] - i + 1, {i, PrimePi@ Sqrt@n}]; Table[ SemiPrimePi[2^n], {n, 47}]
  • PARI
    a(n)=my(s,i,N=2^n); forprime(p=2, sqrtint(N), s+=primepi(N\p); i++); s - i * (i-1)/2 \\ Charles R Greathouse IV, May 12 2013
    
  • Perl
    use ntheory ":all"; print "$ ",semiprime_count(1 << $),"\n" for 1..48; # Dana Jacobsen, Sep 10 2018

Formula

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

A120034 Number of 3-almost primes t such that 2^n < t <= 2^(n+1).

Original entry on oeis.org

0, 0, 1, 1, 5, 6, 17, 30, 65, 131, 257, 536, 1033, 2132, 4187, 8370, 16656, 33123, 65855, 130460, 259431, 513737, 1019223, 2019783, 4003071, 7930375, 15712418, 31126184, 61654062, 122137206, 241920724, 479226157, 949313939, 1880589368, 3725662783
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_3(2^n) = A127396(n).

Examples

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

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]}]; t = Table[ ThreePrimePi[2^n], {n, 0, 35}]; Rest@t - Most@t

A120036 Number of 5-almost primes 5ap such that 2^n < 5ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 5, 8, 21, 41, 91, 199, 403, 873, 1767, 3740, 7709, 15910, 32759, 67185, 138063, 281566, 576165, 1173435, 2390366, 4860357, 9873071, 20033969, 40612221, 82266433, 166483857, 336713632, 680482316, 1374413154, 2774347425
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_5(2^n) = 0, 0, 0, 0, 1, 2, 7, 15, 36, 77, 168, 367, 770, 1643,..

Examples

			(2^5, 2^6] there is one semiprime, namely 48. 32 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    FiveAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k*Prime@l)] - l + 1, {i, PrimePi[n^(1/5)]}, {j, i, PrimePi[(n/Prime@i)^(1/4)]}, {k, j, PrimePi[(n/(Prime@i*Prime@j))^(1/3)]}, {l, k, PrimePi[(n/(Prime@i*Prime@j*Prime@k))^(1/2)]}]; t = Table[ FiveAlmostPrimePi[2^n], {n, 0, 37}]; Rest@t - Most@t

A120037 Number of 6-almost primes 6ap such that 2^n < 6ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 44, 96, 215, 439, 959, 1967, 4185, 8735, 18143, 37695, 77939, 161479, 332008, 684502, 1404867, 2882712, 5904454, 12078654, 24682057, 50375102, 102724466, 209250102, 425921989, 866187909, 1760280404, 3574740094
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_6(2^n).

Examples

			(2^6, 2^7] there is one semiprime, namely 96. 64 was counted in the previous entry.
		

Crossrefs

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 *)
    t = Table[AlmostPrimePi[6, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120038 Number of 7-almost primes 7ap such that 2^n < 7ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 46, 99, 224, 461, 1013, 2093, 4459, 9388, 19603, 40946, 85087, 177200, 366248, 758686, 1565038, 3226717, 6641105, 13648299, 28018956, 57445770, 117667693, 240751326, 492172466, 1005221914, 2051468099
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_7(2^n).

Examples

			(2^7, 2^8] there is one semiprime, namely 192. 128 was counted in the previous entry.
		

Crossrefs

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 *)
    t = Table[AlmostPrimePi[7, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120039 Number of 8-almost primes 8ap such that 2^n < 8ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 101, 229, 473, 1044, 2171, 4634, 9796, 20513, 43020, 89684, 187361, 388633, 807508, 1671160, 3455934, 7135226, 14708436, 30286472, 62280024, 127944070, 262543635, 538266791, 1102507513, 2256357137
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_8(2^n).

Examples

			(2^8, 2^9] there is one semiprime, namely 384. 256 was counted in the previous entry.
		

Crossrefs

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 *)
    t = Table[AlmostPrimePi[8, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120040 Number of 9-almost primes 9ap such that 2^n < 9ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 102, 232, 482, 1062, 2217, 4738, 10051, 21083, 44315, 92608, 193824, 402936, 838879, 1739794, 3605077, 7457977, 15404202, 31781036, 65481376, 134777594, 277096118, 569173839, 1168002568, 2394834166
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_9(2^n).

Examples

			(2^9, 2^10] there is one semiprime, namely 768. 512 was counted in the previous entry.
		

Crossrefs

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 *)
    t = Table[AlmostPrimePi[9, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120041 Number of 10-almost primes k such that 2^n < k <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 103, 233, 487, 1072, 2246, 4803, 10202, 21440, 45115, 94434, 197891, 412010, 858846, 1783610, 3700698, 7665755, 15853990, 32750248, 67564405, 139238488, 286625278, 589472979, 1211146741, 2486322304
Offset: 0

Views

Author

Keywords

Crossrefs

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 *)
    t = Table[AlmostPrimePi[10, 2^n], {n, 0, 39}]; Rest@t - Most@t
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A120041(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def almostprimepi(n,k): return int(sum(primepi(n//prod(c[1] for c in a))-a[-1][0] for a in g(n,0,1,1,k)) if k>1 else primepi(n))
        return -almostprimepi(m:=1<Chai Wah Wu, Aug 31 2024

Formula

a(n) ~ 2^n log^9 n/(725760 n log 2). [Charles R Greathouse IV, Dec 28 2011]
Showing 1-10 of 14 results. Next