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

A356763 Triprime gaps (A114403) in the order of first occurrence.

Original entry on oeis.org

4, 6, 2, 7, 1, 12, 5, 11, 3, 14, 8, 9, 10, 18, 13, 15, 16, 21, 17, 19, 22, 32, 24, 20, 23, 29, 28, 25, 26, 33, 34, 27, 30, 31, 37, 40, 35, 36, 46, 39, 41, 44, 45, 42, 38, 50, 58, 43, 51, 54, 49, 52, 48, 47, 56, 55, 53, 60, 57, 59, 63, 61, 65, 66, 69, 64, 62, 67, 68, 70, 83, 71, 73, 78, 72
Offset: 1

Views

Author

Zak Seidov, Aug 26 2022

Keywords

Crossrefs

Cf. A014320 (for prime gaps), A356769 (for semiprime gaps).

Programs

  • Mathematica
    DeleteDuplicates[Differences[Select[Range[10^6], PrimeOmega[#] == 3 &]]] (* Amiram Eldar, Aug 26 2022 *)

A114412 Records in semiprime gaps ordered by merit.

Original entry on oeis.org

2, 3, 4, 6, 11, 19, 24, 28, 30, 32, 38, 47, 54, 70, 74, 107, 110, 112, 120, 126, 146
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Comments

There is an associated index list n = 1, 2, 4, 6, 34, 422, 1765, 4585, 8112, 8650, 8861, 75150, ... and an associated semiprime list A001358(n) = 4, 6, 10, 15, 1418, 6559, 17965, 32777, 35103, 35981, 340894, ... - R. J. Mathar, Mar 15 2009

Examples

			Records defined in terms of A065516 and A001358:
.
  n  A065516(n)  A065516(n)/log_10(A001358(n))
  =  ==========  ==============================
  1       2      2 / log_10(4)  = 3.32192809...
  2       3      3 / log_10(6)  = 3.85529162...
  3       1      1 / log_10(9)  = 1.04795163...
  4       4      4 / log_10(10) = 4.00000000
  5       1      1 / log_10(14) = 0.87250286...
  6       6      6 / log_10(15) = 5.10164492...
  7       1      1 / log_10(21) = 0.75630419...
  8       3      3 / log_10(22) = 2.23476557...
  9       1      1 / log_10(25) = 0.71533827...
		

Crossrefs

Programs

  • Mathematica
    sp = 4; m0 = 0;  l = {}; lim = 1000000;
    For[i = 5, i <= lim, i++, If[PrimeOmega[i] == 2, m = (i - sp)/Log[sp]; If[m > m0, m0 = m; AppendTo[l, i - sp]]; sp = i] ]; l (* Robert Price, Oct 29 2018 *)

Formula

a(n) = records in A065516(n)/log_10(A001358(n)) = records in (A001358(n+1) - A001358(n))/log_10(A001358(n)).

Extensions

Corrected and extended by Charles R Greathouse IV, Oct 05 2006
a(16)-a(21) from Donovan Johnson, Feb 17 2010

A130650 a(n) = smallest k such that A014612(n+1) = A014612(n) + (A014612(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 4, 13, 2, 13, 18, 4, 43, 8, 3, 41, 4, 4, 3, 13, 2, 37, 16, 43, 97, 4, 9, 10, 53, 4, 5, 10, 3, 6, 61, 43, 2, 11, 2, 12, 163, 8, 13, 2, 5, 173, 8, 89, 4, 3, 37, 61, 101, 101, 107, 229, 113
Offset: 1

Views

Author

Rémi Eismann, Aug 16 2007 - Jan 21 2011

Keywords

Comments

a(n) is the "weight" of 3-almost primes.
The decomposition of 3-almost primes into weight * level + gap is A014612(n) = a(n) * A184753(n) + A114403(n) if a(n) > 0.

Examples

			For n = 1 we have A014612(1) = 8, A014612(2) = 12; there is no k such that 12 - 8 = 4 = (8 mod k), hence a(1) = 0.
For n = 3 we have A014612(3) = 18, A014612(4) = 20; 4 is the smallest k such that 20 - 18 = 2 = (18 mod k), hence a(3) = 4.
For n = 21 we have A014612(21) = 98, A014612(22) = 99; 97 is the smallest k such that 99 - 98 = 1 = (97 mod k), hence a(21) = 97.
		

Crossrefs

A114405 5-almost prime gaps. First differences of A014614.

Original entry on oeis.org

16, 24, 8, 28, 4, 8, 42, 6, 8, 4, 20, 8, 35, 9, 12, 6, 2, 8, 20, 4, 8, 56, 10, 14, 4, 9, 3, 12, 20, 10, 6, 8, 4, 28, 4, 20, 32, 15, 21, 4, 2, 18, 4, 14, 26, 4, 15, 5, 4, 4, 8, 4, 2, 26, 16, 6, 2, 8, 20, 48, 20, 34, 6, 3, 27, 2, 4, 20, 1, 7, 16, 8, 4, 4, 6, 30, 6, 6, 12, 6, 3, 11
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Comments

First occurrences of a(n)=1,2,3,.. are at n=69, 17, 27, 5, 48, 8, 70, 3, 14, 23, 82, 15, 150, 24, 38, 1, 172, 42, 258, 11, 39, 135, 102, 2, 779, 45, 65, 4, 518, 76, 263, 37, 211, 62, 13, 1009, 2463, 606, 254, 151, 3348, 7, 4513,... - R. J. Mathar, Oct 06 2007

Examples

			a(1) = 16 = 48-32 where 32 is the first 5-almost prime and 48 is the second.
a(2) = 24 = 72-48.
a(3) = 8 = 80-72.
a(4) = 28 = 108-80.
a(5) = 4 = 112-108.
a(6) = 8 = 120-112.
a(7) = 42 = 162-120.
a(8) = 6 = 168-162.
a(13) = 35 = 243-208.
a(22) = 56 = 368-312.
		

Crossrefs

Programs

  • Mathematica
    Differences[Select[Range[2000],PrimeOmega[#]==5&]] (* Harvey P. Dale, Sep 28 2019 *)

Formula

a(n) = A014614(n+1) - A014614(n).

Extensions

More terms from R. J. Mathar, Oct 06 2007

A114414 Records in 4-almost prime gaps ordered by merit.

Original entry on oeis.org

8, 12, 14, 21, 28
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Comments

Next term (if it exists) associated with A014613 > 1030000. - R. J. Mathar, Mar 13 2007

Examples

			Records defined in terms of A114404 and A014613:
  n  A114404(n)  A114404(n)/log_10(A014613(n))
  =  ==========  =============================
  1      8       8/log_10(16)   = 6.64385619
  2      12      12/log_10(24)  = 8.6943213
  3      4       4/log_10(36)   = 2.57019442
  4      14      14/log_10(40)  = 8.73874891
  5      2       2/log_10(54)   = 1.15447195
  6      4       4/log_10(56)   = 2.2880834
  7      21      21/log_10(60)  = 11.810019
  ...
  13     22      22/log_10(104) = 10.9071078
  ...
  21     28      28/log_10(156) = 12.7671725
		

Crossrefs

Programs

  • Maple
    Digits := 16 : A114414 := proc() local n,a014613,a114414,rec ; a014613 := 16 ; a114414 := 8 ; rec := a114414/log(a014613) ; print(a114414) ; n := 17 ; while true do while numtheory[bigomega](n) <> 4 do n := n+1 ; od ; a114414 := n-a014613 ; if ( evalf(a114414/log(a014613)) > evalf(rec) ) then rec := a114414/log(a014613) ; print(a114414) ; fi ; a014613 := n ; n := n+1 : od ; end: A114414() ; # R. J. Mathar, Mar 13 2007

Formula

a(n) = records in A114404(n)/log_10(A014613(n)) = records in (A014613(n+1) - A014613(n))/log_10(A014613(n)).

A184752 a(n) = largest k such that A014612(n+1) = A014612(n) + (A014612(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 16, 13, 26, 26, 18, 40, 43, 40, 48, 41, 60, 64, 66, 65, 74, 74, 64, 86, 97, 96, 99, 100, 106, 112, 115, 110, 123, 120, 122, 129, 146, 143, 152, 144, 163, 160, 169, 170, 170, 173, 168, 178, 184, 186, 185, 183, 202, 202, 214
Offset: 1

Views

Author

Rémi Eismann, Jan 21 2011

Keywords

Comments

From the definition, a(n) = A014612(n) - A114403(n) if A014612(n) - A114403(n) > A114403(n), 0 otherwise where A014612 are the 3-almost primes and A114403 are the gaps between 3-almost primes.

Examples

			For n = 1 we have A014612(1) = 8, A014612(2) = 12; there is no k such that 12 - 8 = 4 = (8 mod k), hence a(1) = 0.
For n = 3 we have A014612(3) = 18, A014612(4) = 20; 16 is the largest k such that 20 - 18 = 2 = (18 mod k), hence a(3) = 16.
For n = 21 we have A014612(21) = 98, A014612(22) = 99; 97 is the largest k such that 99 - 98 = 1 = (97 mod k), hence a(21) = 97.
		

Crossrefs

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

A124319 Semiprime(3almostprime(n))-3almostprime(semiprime(n)). Commutator[A001358, A014612] at n.

Original entry on oeis.org

2, 6, 7, 12, 16, 17, -11, 24, 23, 20, -1, 10, 48, 40, 39, 26, 14, 4, -1, 51, 60, 48, 48, 43, 31, 39, 22, 15, 37, 32, 39, 60, 90, 82, 68, 63, 64, 58, 66, 51, 53, 48, 28, 34, 42, 24, 28, 39, 87, 96, 106, 124, 124, 135, 131, 131, 88, 91, 72, 96, 103, 83, 83, 81, 91
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Examples

			a(1) = semiprime(3almostprime(1)) - 3almostprime(semiprime(1)) = 22 - 20 = 2.
a(2) = semiprime(3almostprime(2)) - 3almostprime(semiprime(2)) = 34 - 28 = 6.
a(3) = semiprime(3almostprime(3)) - 3almostprime(semiprime(3)) = 51 - 44 = 7.
a(4) = semiprime(3almostprime(4)) - 3almostprime(semiprime(4)) = 57 - 45 = 12.
a(7) = semiprime(3almostprime(7)) - 3almostprime(semiprime(7)) = 87 - 98 = -11, which is the first negative value in the commutators we have seen in these related set of sequences, exposing an incorrect assumption.
		

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_] := p[k] = Select[Range[1000], PrimeOmega[#] == k &]; p[2][[ Take[p[3], 70]]] - p[3][[Take[p[2], 70]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124319(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)))
        def A001358(n):
            m, k = n, g(n)+n
            while m != k:
                m, k = k, g(k)+n
            return m
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = (p:=A001358(n)), f(p)+p
        while r != k:
            r, k = k, f(k)+p
        return A001358(m)-r # Chai Wah Wu, Aug 17 2024

Extensions

a(18) corrected and a(22)-a(65) from Giovanni Resta, Jun 13 2016

A126436 Number of composites between successive values of A014612.

Original entry on oeis.org

2, 3, 0, 5, 0, 0, 8, 0, 0, 3, 1, 7, 2, 0, 1, 2, 0, 1, 10, 4, 0, 1, 1, 2, 2, 1, 0, 6, 0, 3, 5, 7, 0, 2, 0, 7, 0, 3, 0, 0, 0, 0, 4, 3, 1, 1, 2, 9, 3, 9, 4, 0, 3, 1, 1, 1, 0, 0, 7, 1, 2, 3, 1, 2, 1, 2, 1, 0, 0, 0, 3, 1
Offset: 1

Views

Author

Jonathan Vos Post, Mar 12 2007

Keywords

Examples

			a(1) = 2 because there are two composites {9,10} between A014612(1)=8 and A014612(2)=12.
a(2) = 3 because there are two composites {14, 15, 16} between A014612(2)=12 and A014612(3)=18.
a(3) = 0 because there are no composites between A014612(3)=18 and A014612(4)=20, only the prime 19.
a(7) = 8 because {32,33,34,35,36,38,39,40} between A014612(7)=30 and A014612(8)=42.
		

Crossrefs

3-almost prime analog of A046933 = number of composites between successive primes.

Programs

  • Maple
    isA014612 :=proc(n) if numtheory[bigomega](n) = 3 then true ; else false ; fi ; end: isA002808 := proc(n) RETURN(not isprime(n) and n <> 1 ); end: A126436 := proc(nmax) local a ; a := -1 ; for n from 1 to nmax do if isA014612(n) then if a >= 0 then printf("%d,",a) ; fi ; a := 0 ; elif isA002808(n) and a>= 0 then a := a+1 ; fi ; od : end: A126436(300) : # R. J. Mathar, Apr 03 2007
  • Mathematica
    nmax = 72;
    S = Select[Range[300](* increase range if a(n) unevaluated *), PrimeOmega[#] == 3&];
    a[n_ /; n+1 <= Length[S]] := Count[Range[S[[n]]+1, S[[n+1]]-1], _?CompositeQ];
    Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Oct 26 2023 *)

Formula

a(n) <= A114403(n) - 1.

Extensions

More terms from R. J. Mathar, Apr 03 2007
Showing 1-10 of 23 results. Next