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

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 103, 234, 490, 1078, 2261, 4844, 10294, 21659, 45609, 95580, 200422, 417715, 871452, 1811412, 3761623, 7798409, 16142081, 33373093, 68906782, 142120436, 292797806, 602653984, 1239225631
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			(2^11, 2^12] there is one semiprime, namely 3072. 2048 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[11, 2^n], {n, 0, 30}]; Rest@t - Most@t
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A120042(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, Jun 17 2025

A092097 Limit number of (m-n)-almost-primes in range [2^m..2^{m+1}-1].

Original entry on oeis.org

2, 5, 8, 22, 47, 103, 234, 493, 1087, 2282, 4901, 10427, 21993, 46389, 97394, 204567, 427099, 892587, 1858338, 3865692, 8027140, 16642918, 34463760, 71273199, 147235636, 303814862, 626313383, 1289883519, 2654196000
Offset: 0

Views

Author

Andrew S. Plewe, Feb 19 2004

Keywords

Comments

Also number of odd numbers k for which floor(log_2(k)) - bigomega(k) = n, where bigomega is A001222. - Franklin T. Adams-Watters, Jun 20 2006
The value of m at which the number of (m-n)-almost-primes reaches its limit is floor(n/(log_2(3)-1))+n-1: 1,4,7,9,12,15,17,20,23,26,28; not A026356: 2,4,7,9,12,15,17,20,22,25,28 as originally conjectured. - Franklin T. Adams-Watters, Jun 20 2006

Examples

			a(0) = 2: m-almost primes in [2^m..2^{m+1}-1] are 2^m and 3*2^{m-1}.
a(1) = 5; (m-1)-almost-primes in [2^m..2^{m-1}] are 5*2^{m-2}, 7*2^{m-2}, 9*2^{m-3}, 15*2^{m-3} and 27*2^{m-4}.
		

Crossrefs

Formula

For n>0, a(n) = A052130(n+1)-A052130(n).

Extensions

Edited and extended by Franklin T. Adams-Watters, Jun 20 2006

A362318 Number of odd semiprimes between 2^(n-1) and 2^n.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 7, 13, 27, 52, 104, 210, 398, 807, 1542, 3046, 5936, 11565, 22584, 44012, 86062, 167786, 327936, 640630, 1252327, 2448518, 4791344, 9378159, 18364095, 35979682, 70515477, 138275503, 271246674, 532304906, 1045047118, 2052464984, 4032502528
Offset: 0

Views

Author

Sidney Cadot, Apr 16 2023

Keywords

Comments

This is the number of odd integers with precisely n bits that are the product of two (possibly identical) prime factors.
Odd numbers with two prime factors are used as the modulus in the RSA algorithm. This sequence gives the number of "candidate" RSA moduli having precisely n bits. Note that many of these candidates would not be suitable for cryptographic applications because they are easily factored.

Crossrefs

Programs

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

Formula

a(n) = A362042(n) - A362042(n-1) for n>=1.
a(n) = A120033(n-1) - A036378(n-2) for n > 1. - Chai Wah Wu, Apr 24 2023

Extensions

More terms from Chai Wah Wu, Apr 24 2023 (using data in A120033 and A036378)

A119584 a(n) = Sum_{k=1..phi(n)-1} t(n,k)*t(n,k+1), where t(n,k) is the k-th positive integer which is coprime to n and phi(n) is the number of positive integers which are <= n and are coprime to n.

Original entry on oeis.org

0, 0, 2, 3, 20, 5, 70, 53, 121, 87, 330, 117, 572, 305, 507, 553, 1360, 481, 1938, 873, 1586, 1405, 3542, 1241, 3846, 2415, 4006, 2765, 7308, 1875, 8990, 4945, 6828, 5675, 9333, 4525, 15540, 8053, 11567, 7745, 21320, 6047, 24682, 12005, 15244, 14625
Offset: 1

Views

Author

Leroy Quet, May 31 2006

Keywords

Comments

All primes are records and there exists records which are not primes, but they are rare (see A120033). - Robert G. Wilson v, Jun 05 2006

Examples

			The positive integers which are <= 8 and are coprime to 8 are 1, 3, 5 and 7. So a(8) = 1*3 + 3*5 + 5*7 = 53.
		

Programs

  • Mathematica
    a[n_] := Block[{s = Select[ Range@n, GCD[ #, n] == 1 &]}, Plus @@ (Most@s*Rest@s)]; Array[a, 46] (* Robert G. Wilson v, Jun 05 2006 *)
  • PARI
    a(n) = my(v=select(x->gcd(x, n)==1, [1..n])); sum(k=1, #v-1, v[k]*v[k+1]); \\ Michel Marcus, Mar 07 2024

Extensions

More terms from Robert G. Wilson v, Jun 05 2006
Previous Showing 11-14 of 14 results.