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 15 results. Next

A106349 Primes indexed by semiprimes.

Original entry on oeis.org

7, 13, 23, 29, 43, 47, 73, 79, 97, 101, 137, 139, 149, 163, 167, 199, 227, 233, 257, 269, 271, 293, 313, 347, 373, 389, 421, 439, 443, 449, 467, 487, 491, 499, 577, 607, 631, 647, 653, 661, 673, 677, 727, 751, 757, 811, 821, 823, 829, 839, 907, 929, 937, 947
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2005

Keywords

Comments

This is the sequence of the k-th prime for k = {4,6,9,10,14,15,21,22,25,26,33,34,35,38,39,46,49,51,...}. Not to be confused with A106350: semiprimes indexed by primes.

Examples

			a(1) = 7 because semiprime(1) = 4, so prime(semiprime(1)) = prime(4) = 7.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Vincenzo Librandi, Nov 28 2015
    
  • Mathematica
    Prime@ Select[Range@ 161, PrimeOmega@ # == 2 &] (* or *) Select[Prime@ Range@ 161, PrimeOmega@ PrimePi@ # == 2 &] (* Michael De Vlieger, Nov 28 2015 *)
  • PARI
    lista(nn) = select(x->(bigomega(primepi(x))==2), primes(nn)); \\ Michel Marcus, Nov 29 2015

Formula

a(n) = prime(semiprime(n)).
a(n) = A000040(A001358(n)).
pi(a(n)) = p*q for some primes p and q.
Sum_{n>=1} 1/a(n) is in the interval (0.9910, 0.9915) (Kinlaw et al., 2024, Theorem 6, p. 11). - Amiram Eldar, Nov 09 2024

A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040,A001358] at n.

Original entry on oeis.org

1, 4, 9, 8, 10, 12, 24, 24, 32, 15, 46, 24, 27, 34, 25, 40, 44, 46, 51, 54, 53, 46, 54, 60, 70, 70, 98, 105, 104, 91, 64, 72, 45, 48, 95, 118, 120, 120, 116, 108, 100, 96, 101, 118, 102, 144, 123, 86, 76, 81, 136, 138, 143, 112, 132, 131, 153, 160, 171, 169
Offset: 1

Views

Author

Jonathan Vos Post, Oct 23 2006

Keywords

Examples

			a(1) = prime(semiprime(1)) - semiprime(prime(1)) = prime(4) - semiprime(2) = 7 - 6 = 1.
a(2) = prime(semiprime(2)) - semiprime(prime(2)) = prime(6) - semiprime(3) = 13 - 9 = 4.
a(3) = prime(semiprime(3)) - semiprime(prime(3)) = prime(9) - semiprime(5) = 23 - 14 = 9.
a(4) = prime(semiprime(4)) - semiprime(prime(4)) = prime(10) - semiprime(7) = 29 - 21 = 8.
		

Crossrefs

Programs

  • Mathematica
    sp = Select[Range[1000], PrimeOmega[#] == 2 &]; Table[ Prime[ sp[[i]]] - sp[[Prime[i]]], {i, PrimePi@ Length@ sp}] (* Giovanni Resta, Jun 13 2016 *)

Formula

a(n) = A106349(n) - A106350(n).

Extensions

a(33)-a(54) corrected by and a(55)-a(60) from Giovanni Resta, Jun 13 2016

A124268 Primes indexed by 3-almost primes.

Original entry on oeis.org

19, 37, 61, 71, 103, 107, 113, 181, 193, 197, 229, 239, 307, 317, 337, 349, 379, 383, 397, 479, 521, 523, 557, 571, 601, 619, 641, 643, 683, 691, 733, 787, 853, 857, 883, 887, 971, 977, 1013, 1019, 1021, 1033, 1039, 1091, 1109, 1123, 1151, 1187, 1279
Offset: 1

Views

Author

Jonathan Vos Post, Oct 23 2006

Keywords

Comments

3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040,A001358] at n.

Examples

			a(1) = prime(3almostprime(1)) = prime(8) = 19.
a(2) = prime(3almostprime(2)) = prime(12) = 37.
a(3) = prime(3almostprime(3)) = prime(18) = 61.
		

Crossrefs

Programs

  • Mathematica
    Prime[#]&/@Select[Range[400],PrimeOmega[#]==3&] (* Harvey P. Dale, Mar 19 2020 *)

Formula

a(n) = prime(3almostprime(n)) = A000040(A014612(n)). {p such that p is prime and omega(primepi(p)) = 3} = {p such that p is in A000040 and A001222(A000720(p)) = 3}.

A124269 3-almost primes indexed by primes.

Original entry on oeis.org

12, 18, 27, 30, 50, 63, 75, 78, 102, 124, 130, 164, 172, 175, 190, 231, 246, 258, 279, 286, 292, 332, 345, 369, 404, 418, 425, 430, 435, 452, 524, 539, 574, 578, 606, 610, 638, 652, 663, 692, 722, 725, 775, 782, 795, 801, 854, 906, 916, 927, 938, 963, 969
Offset: 1

Views

Author

Jonathan Vos Post, Oct 23 2006

Keywords

Comments

Primes indexed by 3-almostprimes = A124268. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040,A001358] at n.

Examples

			a(1) = 3almostprime(prime(1)) = 3almostprime(2) = 12 = 2^2 * 3.
a(2) = 3almostprime(prime(2)) = 3almostprime(3) = 18 = 2 * 3^2.
a(3) = 3almostprime(prime(3)) = 3almostprime(5) = 27 = 3^3.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Oct 15 2010: (Start)
    A014612 := proc(n) option remember; if n = 1 then 8; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 3 then return a; end if; end do; end if; end proc:
    A124269 := proc(n) A014612(ithprime(n)) ; end proc: seq(A124269(n),n=1..80) ; (End)
  • Mathematica
    p3 = Select[Range[1000], PrimeOmega[#] == 3 &]; p3[[Prime@ Range@ PrimePi@ Length@ p3]] (* Giovanni Resta, Jun 13 2016 *)

Formula

a(n) = 3almostprime(prime(n)) = A014612(A000040(n)).

Extensions

More terms from R. J. Mathar, Oct 15 2010

A124270 a(n) = prime(A014612(n)) - A014612(prime(n)). Commutator [A000040,A014612] at n.

Original entry on oeis.org

7, 19, 34, 41, 53, 44, 38, 103, 91, 73, 99, 75, 135, 142, 147, 118, 133, 125, 118, 193, 229, 191, 212, 202, 197, 201, 216, 213, 248, 239, 209, 248, 279, 279, 277, 277, 333, 325, 350, 327, 299, 308, 264, 309, 314, 322, 297, 281, 363, 374, 461, 488, 484, 482
Offset: 1

Views

Author

Jonathan Vos Post, Oct 23 2006

Keywords

Examples

			a(1) = prime(3almostprime(1)) - 3almostprime(prime(1)) = prime(8) - 3almostprime(2) = 19 - 12 = 7.
a(2) = prime(3almostprime(2)) - 3almostprime(prime(2)) = prime(12) - 3almostprime(3) = 37 - 18 = 19.
a(3) = prime(3almostprime(3)) - 3almostprime(prime(3)) = prime(18) - 3almostprime(5) = 61 - 27 = 34.
		

Crossrefs

Cf. A000040 (primes), A014612 (3-almost primes).
Cf. A124268 (prime(3-almost prime(n))), A124269 (3-almost prime(prime(n))).
Cf. A106349 (prime(semiprime(n))), A106350 (semiprime(prime(n))), A122824 (prime(semiprime(n)) - semiprime(prime(n))).

Programs

  • PARI
    lista(nn) = {p = primes(nn); pp = select(x->bigomega(x)==3, vector(nn, n, n)); for (n=1, nn, print1(p[pp[n]] - pp[p[n]], ", "););} \\ Michel Marcus, Oct 15 2014

Formula

a(n) = A000040(A014612(n)) - A014612(A000040(n)).
a(n) = A124268(n) - A124269(n).

A124282 Primes indexed by 4-almost primes.

Original entry on oeis.org

53, 89, 151, 173, 251, 263, 281, 419, 433, 457, 463, 541, 569, 701, 743, 761, 769, 809, 863, 881, 911, 1097, 1129, 1193, 1213, 1249, 1291, 1373, 1427, 1439, 1459, 1481, 1571, 1583, 1657, 1783, 1931, 1949, 1951, 2017, 2029, 2087, 2203, 2213, 2287, 2297
Offset: 1

Views

Author

Jonathan Vos Post, Oct 24 2006

Keywords

Comments

4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040,A001358] at n.

Examples

			a(1) = prime(4almostprime(1)) = prime(16) = 53.
a(2) = prime(4almostprime(2)) = prime(24) = 89.
a(3) = prime(4almostprime(3)) = prime(36) = 151.
		

Crossrefs

Formula

a(n) = prime(4almostprime(n)) = A000040(A014613(n)). {p such that p is prime and omega(primepi(p)) = 4} = {p such that p is in A000040 and A001222(A000720(p)) = 4}.

A124283 4-almost primes indexed by primes.

Original entry on oeis.org

24, 36, 54, 60, 90, 104, 136, 150, 189, 225, 232, 294, 308, 328, 344, 375, 441, 459, 488, 510, 516, 550, 570, 621, 676, 708, 714, 738, 748, 776, 852, 860, 884, 910, 999, 1014, 1060, 1096, 1112, 1161, 1197, 1206, 1256, 1274, 1284, 1290, 1356, 1432, 1450, 1482
Offset: 1

Views

Author

Jonathan Vos Post, Oct 24 2006

Keywords

Comments

Primes indexed by 4-almost primes = A124282. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040,A001358] at n.

Examples

			a(1) = 4almostprime(prime(1)) = 4almostprime(2) = 24.
a(2) = 4almostprime(prime(2)) = 4almostprime(3) = 36.
a(3) = 4almostprime(prime(3)) = 4almostprime(5) = 54.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import prime, primepi, integer_nthroot, primerange
    def A124283(n):
        def f(x): return int(prime(n)+x-sum(primepi(x//(k*m*r))-c for a, k in enumerate(primerange(integer_nthroot(x, 4)[0]+1)) for b, m in enumerate(primerange(k, integer_nthroot(x//k, 3)[0]+1), a) for c, r in enumerate(primerange(m, isqrt(x//(k*m))+1), b)))
        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 09 2024

Formula

a(n) = 4almostprime(prime(n)) = A014613(A000040(n)).

Extensions

a(17)-a(50) from Giovanni Resta, Jun 13 2016

A124284 Prime(4almostprime(n))-4almostprime(prime(n)). Commutator [A000040,A014613] at n.

Original entry on oeis.org

29, 53, 97, 113, 161, 159, 145, 269, 244, 232, 231, 247, 261, 373, 399, 386, 328, 350, 375, 371, 395, 547, 559, 572, 537, 541, 577, 635, 679, 663, 607, 621, 687, 673, 658, 769, 871, 853, 839, 856, 832, 881, 947, 939, 1003, 1007, 955, 915, 907, 889, 941, 989
Offset: 1

Views

Author

Jonathan Vos Post, Oct 24 2006

Keywords

Examples

			a(1) = prime(4almostprime(1)) - 4almostprime(prime(1)) = 53 - 24 = 29.
a(2) = prime(4almostprime(2)) - 4almostprime(prime(2)) = 89 - 36 = 53.
a(3) = prime(4almostprime(3)) - 4almostprime(prime(3)) = 151 - 54 = 97.
It is mere coincidence that the first 4 values are all primes.
		

Crossrefs

Cf. Primes indexed by 4-almost primes = A124282. 4-almost primes indexed by primes = A124283. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)).

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)]}];
    FourAlmostPrime[n_] := Block[{e = Floor[Log[2, n] + 1], a, b}, a = 2^e; Do[b = 2^p; While[ FourAlmostPrimePi@a < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2];
    Table[ Prime@ FourAlmostPrime@ n - FourAlmostPrime@ Prime@ n, {n, 52}]
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, prime
    def A124284(n):
        def f(x): return int(x-sum(primepi(x//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(x,4)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(x//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(x//(k*m))+1),b)))
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = (p:=prime(n)), f(p)+p
        while r != k:
            r, k = k, f(k)+p
        return prime(m)-r # Chai Wah Wu, Aug 17 2024

Formula

a(n) = prime(4almostprime(n)) - 4almostprime(prime(n)) = A000040(A014613(n)) -A014613(A000040(n)).

Extensions

More terms from Robert G. Wilson v, Aug 31 2007

A124309 5-almost primes indexed by primes.

Original entry on oeis.org

48, 72, 108, 120, 180, 208, 270, 280, 368, 420, 450, 520, 592, 612, 660, 700, 760, 828, 920, 952, 976, 1032, 1064, 1128, 1242, 1288, 1323, 1372, 1380, 1428, 1575, 1624, 1674, 1700, 1752, 1768, 1880, 1976, 2028, 2096, 2178, 2196, 2312, 2328, 2384, 2394, 2475
Offset: 1

Views

Author

Jonathan Vos Post, Oct 25 2006

Keywords

Examples

			a(1) = 5almostprime(prime(1)) = 5almostprime(2) = 48 = 2^4 * 3.
a(2) = 5almostprime(prime(2)) = 5almostprime(3) = 72 = 2^3 * 3^2.
a(3) = 5almostprime(prime(3)) = 5almostprime(5) = 108 = 2^2 * 3^3.
		

Crossrefs

Cf. A124308 Primes indexed by 5-almost primes. A124310 prime(5almostprime(n)) - 5almostprime(prime(n)). 4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040, A001358] at n.

Programs

  • PARI
    list(lim)=my(v=List(),u=v); forprime(p=2,lim\16, forprime(q=2,min(lim\(8*p),p), forprime(r=2,min(lim\(4*p*q),q), forprime(s=2,min(lim\(2*p*q*r),r), forprime(t=2,min(lim\(p*q*r*s),s), listput(v,p*q*r*s*t)))))); v=Set(v); forprime(p=2,#v, listput(u,v[p])); v=0; Vec(u) \\ Charles R Greathouse IV, Feb 10 2017

Formula

a(n) = 5almostprime(prime(n)) = A014614(A000040(n)).

Extensions

a(16)-a(47) from Giovanni Resta, Jun 13 2016

A124308 Primes indexed by 5-almost primes.

Original entry on oeis.org

131, 223, 359, 409, 593, 613, 659, 953, 997, 1049, 1069, 1223, 1283, 1543, 1601, 1693, 1733, 1747, 1811, 1987, 2003, 2069, 2503, 2593, 2693, 2713, 2789, 2801, 2903, 3079, 3181, 3221, 3301, 3323, 3541, 3571, 3727, 4003, 4127, 4283
Offset: 1

Views

Author

Jonathan Vos Post, Oct 25 2006

Keywords

Examples

			a(1) = prime(5almostprime(1)) = prime(32 = 2^5) = 131.
a(2) = prime(5almostprime(2)) = prime(48 = 2^4 * 3) = 223.
a(3) = prime(5almostprime(3)) = prime(72 = 2^3 * 3^2) = 359.
a(4) = prime(5almostprime(4)) = prime(80 = 2^4 * 5) = 409.
		

Crossrefs

Cf. A124309 5-almost primes indexed by primes. A124310 prime(5almostprime(n)) - 5almostprime(prime(n)). 4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040, A001358] at n.

Programs

  • Mathematica
    Prime[#]&/@Select[Range[600],PrimeOmega[#]==5&] (* Harvey P. Dale, Nov 20 2015 *)

Formula

a(n) = prime(5almostprime(n)) = A000040(A014614(n)). {p such that p is prime and omega(primepi(p)) = 5} = {p such that p is in A000040 and A001222(A000720(p)) = 5}.
Showing 1-10 of 15 results. Next