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-20 of 28 results. Next

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

A340018 MM-numbers of labeled graphs with half-loops covering an initial interval of positive integers, without isolated vertices.

Original entry on oeis.org

1, 3, 13, 15, 39, 65, 141, 143, 145, 165, 195, 377, 429, 435, 611, 705, 715, 1131, 1363, 1551, 1595, 1833, 1885, 1937, 2021, 2117, 2145, 2235, 2365, 2397, 2409, 2431, 2465, 2805, 3055, 4089, 4147, 4785, 5655, 5811, 6063, 6149, 6235, 6351, 6409, 6721, 6815
Offset: 1

Views

Author

Gus Wiseman, Jan 02 2021

Keywords

Comments

Here a half-loop is an edge with only one vertex, to be distinguished from a full loop, which has two equal vertices.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. The multiset of multisets with MM-number n is formed by taking the multiset of prime indices of each part of the multiset of prime indices of n. For example, the prime indices of 78 are {1,2,6}, so the multiset of multisets with MM-number 78 is {{},{1},{1,2}}.
Also products of distinct primes whose prime indices are either themselves prime or a squarefree semiprime, and whose prime indices together cover an initial interval of positive integers. A squarefree semiprime (A006881) is a product of any two distinct prime numbers.

Examples

			The sequence of terms together with their corresponding multisets of multisets (edge sets) begins:
     1: {}
     3: {{1}}
    13: {{1,2}}
    15: {{1},{2}}
    39: {{1},{1,2}}
    65: {{2},{1,2}}
   141: {{1},{2,3}}
   143: {{3},{1,2}}
   145: {{2},{1,3}}
   165: {{1},{2},{3}}
   195: {{1},{2},{1,2}}
   377: {{1,2},{1,3}}
   429: {{1},{3},{1,2}}
   435: {{1},{2},{1,3}}
   611: {{1,2},{2,3}}
   705: {{1},{2},{2,3}}
   715: {{2},{3},{1,2}}
  1131: {{1},{1,2},{1,3}}
		

Crossrefs

The version with full loops is A320461.
The version not necessarily covering an initial interval is A340019.
MM-numbers of graphs with loops are A340020.
A006450 lists primes of prime index.
A106349 lists primes of semiprime index.
A257994 counts prime prime indices.
A302242 is the weight of the multiset of multisets with MM-number n.
A302494 lists MM-numbers of sets of sets, with connected case A328514.
A309356 lists MM-numbers of simple graphs.
A322551 lists primes of squarefree semiprime index.
A339112 lists MM-numbers of multigraphs with loops.
A339113 lists MM-numbers of multigraphs.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normQ[sys_]:=Or[Length[sys]==0,Union@@sys==Range[Max@@Max@@sys]];
    Select[Range[1000],And[SquareFreeQ[#],normQ[primeMS/@primeMS[#]],And@@(PrimeQ[#]||(SquareFreeQ[#]&&PrimeOmega[#]==2)&/@primeMS[#])]&]

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

A230460 Prime(2*prime(n)).

Original entry on oeis.org

7, 13, 29, 43, 79, 101, 139, 163, 199, 271, 293, 373, 421, 443, 491, 577, 647, 673, 757, 821, 839, 929, 983, 1061, 1181, 1231, 1277, 1307, 1361, 1429, 1609, 1667, 1759, 1789, 1973, 1997, 2083, 2161, 2243, 2339, 2411, 2441, 2633, 2663, 2707, 2729, 2917
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2013

Keywords

Comments

A subsequence of A031378 (subsequence of A031215) and of A106349, which are both subsequences of A007821 which is the complement of A006450 in the primes A000040.

Examples

			a(3) = 29 because the third prime is 5, and 2 * 5 = 10, and then we see that the tenth prime is 29.
a(4) = 43 because the fourth prime is 7, and 2 * 7 = 14, and then we see that the fourteenth prime is 43.
		

Crossrefs

Cf. A217622.

Programs

Formula

a(n) ~ 2n log(n) log(2n log(n)) ~ 2n (log n)^2.
a(n) = A000040(A100484(n)). - Omar E. Pol, Oct 19 2013

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}.

A124317 Semiprimes indexed by 3-almost primes.

Original entry on oeis.org

22, 34, 51, 57, 82, 85, 87, 123, 133, 134, 146, 158, 201, 205, 209, 214, 221, 226, 237, 295, 305, 309, 321, 327, 341, 361, 365, 371, 394, 395, 413, 447, 478, 481, 497, 501, 529, 533, 543, 545, 551, 554, 559, 583, 597, 614, 623, 635, 689, 699, 734, 763, 766
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Comments

Note that a(10)-a(9) = a(30)-a(29) = 1, achieving the minimum possible, due to a combination of the appropriate semiprime gap (A065516) and 3-almost prime gap (A114403).

Examples

			a(1) = semiprime(3almostprime(1)) = semiprime(8 = 2^3) = 22 = 2 * 11.
a(2) = semiprime(3almostprime(2)) = semiprime(12 = 2^2 * 3) = 34 = 2 * 17.
a(3) = semiprime(3almostprime(3)) = semiprime(18 = 2 * 3^2) = 51 = 3 * 17.
		

Crossrefs

Cf. A124318 3-almost primes indexed by semiprimes. A124319 semiprime(3almostprime(n)) - 3almostprime(semiprime(n)). A124308 Primes indexed by 5-almost primes. 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
    p[k_] := Select[Range[1000], PrimeOmega[#] == k &]; p[2][[Take[p[3], 60]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124317(n):
        def f(x): return int(x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        def g(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = m, g(m)+m
        while r != k:
            r, k = k, g(k)+m
        return r # Chai Wah Wu, Aug 17 2024

Formula

a(n) = semiprime(3almostprime(n)) = A001358(A014612(n)).

Extensions

Data corrected by Giovanni Resta, Jun 13 2016

A124318 3-almost primes indexed by semiprimes.

Original entry on oeis.org

20, 28, 44, 45, 66, 68, 98, 99, 110, 114, 147, 148, 153, 165, 170, 188, 207, 222, 238, 244, 245, 261, 273, 284, 310, 322, 343, 356, 357, 363, 374, 387, 388, 399, 429, 438, 465, 475, 477, 494, 498, 506, 531, 549, 555, 590, 595, 596, 602, 603, 628, 639, 642
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Examples

			a(1) = 3almostprime(semiprime(1)) = 3almostprime(4 = 2^2) = 20 = 2^2 * 5.
a(2) = 3almostprime(semiprime(2)) = 3almostprime(6 = 2 * 3) = 28 = 2^2 * 7.
a(3) = 3almostprime(semiprime(3)) = 3almostprime(9 = 3^2) = 44 = 2^2 * 11.
a(4) = 3almostprime(semiprime(4)) = 3almostprime(10 = 2 * 5) = 45 = 3^2 * 5.
		

Crossrefs

Cf. A124317 Semiprimes indexed by 3-almost primes. A124318 3-almost primes indexed by semiprimes. A124319 semiprime(3almostprime(n)) - 3almostprime(semiprime(n)). A124308 Primes indexed by 5-almost primes. 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
    p[k_] := Select[Range[1000], PrimeOmega[#] == k &]; p[3][[Take[p[2], 60]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124318(n):
        def g(x): return int(x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        def f(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = m, g(m)+m
        while r != k:
            r, k = k, g(k)+m
        return r # Chai Wah Wu, Aug 17 2024

Formula

a(n) = 3almostprime(semiprime(n)) = A014612(A001358(n)).

Extensions

a(22)-a(53) from Giovanni Resta, Jun 13 2016
Previous Showing 11-20 of 28 results. Next