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 41-50 of 63 results. Next

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

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

Original entry on oeis.org

0, 0, 8, 6, 13, 9, 20, 19, 24, 19, 32, 33, 32, 37, 32, 43, 47, 47, 53, 56, 54, 59, 61, 64, 71, 72, 79, 84, 85, 83, 89, 92, 93, 84, 101, 107, 112, 117, 117, 120, 121, 117, 125, 132, 127, 140, 141, 141, 144, 137, 152, 157, 157
Offset: 1

Views

Author

Rémi Eismann, Jan 20 2011

Keywords

Comments

a(n) = A001358(n) - A065516(n) if A001358(n) - A065516(n) > A065516(n), 0 otherwise.
A001358(n): semiprimes; A065516(n): first difference of semiprimes.

Examples

			For n = 1 we have A001358(n) = 4, A001358(n+1) = 6; there is no k such that 6 - 4 = 2 = (4 mod k), hence a(1) = 0.
For n = 3 we have A001358(n) = 9, A001358(n+1) = 10; 8 is the largest k such that 10 - 9 = 1 = (9 mod k), hence a(3) = 8; a(3) = A001358(3) - A065516(3) = 8.
For n = 20 we have A001358(n) = 57, A001358(n+1) = 58; 56 is the largest k such that 58 - 57 = 1 = (57 mod k), hence a(20) = 56; a(20) = A001358(20) - A065516(20) = 56.
		

Crossrefs

A184729 a(n) = A184728(n)/A130533(n) unless A130533(n) = 0 in which case a(n) = 0.

Original entry on oeis.org

0, 0, 4, 1, 1, 1, 10, 1, 12, 1, 16, 11, 8, 1, 4, 1, 1, 1, 1, 28, 9, 1, 1, 8, 1, 12, 1, 42, 17, 1, 1, 46, 31, 7, 1, 1, 28, 39, 39, 60, 11, 13, 25, 66, 1, 70, 47, 47, 72, 1, 38, 1, 1, 26, 1, 7, 88, 1, 1, 61, 20, 17, 100, 67, 67, 102, 29, 41, 106
Offset: 1

Views

Author

Rémi Eismann, Jan 20 2011

Keywords

Comments

a(n) is the "level" of semiprimes.
The decomposition of semiprimes into weight * level + gap is A001358(n) = A130533(n) * a(n) + A065516(n) if a(n) > 0.
A184728(n) = A001358(n) - A065516(n) if A001358(n) - A065516(n) > A065516(n), 0 otherwise.

Examples

			For n = 1 we have A130533(1) = 0, hence a(1) = 0.
For n = 3 we have A184728(3)/A130533(3)= 8 / 2 = 4; hence a(3) = 4.
For n = 20 we have A184728(20)/A130533(20)= 56 / 2 = 28; hence a(20) = 28.
		

Crossrefs

A217357 Semiprimes p such that next semiprime after p is p+30.

Original entry on oeis.org

32777, 88649, 91799, 113107, 165697, 273257, 310103, 322211, 326137, 460963, 466063, 468877, 480443, 483223, 506509, 509131, 553349, 564347, 565493, 587611, 616771, 623257, 624959, 625619, 739177, 766799, 777163, 826657, 832357, 834123, 845177, 860873, 916163
Offset: 1

Views

Author

Zak Seidov, Oct 01 2012

Keywords

Comments

Smallest difference between two consecutive terms occurs first at a(329) = 5861197 because a(330) = 5861227 and 5861227 - 5861197 = 30. Same difference for a(1212) = 16179703, a(1630) = 20611897 and a(1641) = 20703923.- Zak Seidov, Feb 14 2017

Examples

			32777 =A001358(8112)  = 73*449, 32807 = A001358(8113) = 3*619,
88649 =A001358(20880)  = 11*8059, 88679 = A001358(20881) = 71*1249.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [n: n in [4..1000000] | IsSemiprime(n) and IsSemiprime(n+30) and forall{n+i: i in [1..29] | not IsSemiprime(n+i)}]; // Bruno Berselli, Oct 01 2012
  • Mathematica
    Select[Partition[Select[Range[10^6],PrimeOmega[#]==2&],2,1],#[[2]]-#[[1]] == 30&][[All,1]] (* Harvey P. Dale, May 06 2022 *)

A264045 Numbers n such that n and n+5 are consecutive semiprimes.

Original entry on oeis.org

69, 77, 106, 161, 178, 221, 254, 309, 314, 329, 341, 386, 398, 417, 422, 473, 554, 662, 674, 689, 758, 794, 934, 974, 998, 1094, 1121, 1149, 1169, 1214, 1294, 1502, 1517, 1522, 1541, 1569, 1673
Offset: 1

Views

Author

Zak Seidov, Nov 02 2015

Keywords

Comments

Note that a(1)=69=A131109(k=5).

Examples

			a(1)=69=A001358(24) and a(1)+k=74=A001358(25).
		

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Partition[Table[If[PrimeOmega[n]==2,1,0],{n,2000}],6,1], ?(#=={1,0,0,0,0,1}&)]] (* _Harvey P. Dale, Dec 16 2015 *)
  • PARI
    is(n)=if(n%4==1, isprime((n+5)/2) && bigomega(n)==2, n%4==2 && isprime(n/2) && bigomega(n+5)==2) && bigomega(n+1)!=2 && bigomega(n+2)!=2 && bigomega(n+3)!=2 && bigomega(n+4)!=2 \\ Charles R Greathouse IV, Nov 02 2015

Formula

a(n) >> n log n. - Charles R Greathouse IV, Nov 02 2015

A108197 Number of composite numbers between two successive semiprimes.

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 0, 1, 0, 4, 0, 0, 1, 0, 4, 1, 1, 2, 1, 0, 1, 2, 2, 2, 2, 3, 1, 0, 0, 2, 1, 0, 0, 7, 2, 2, 2, 0, 1, 0, 0, 4, 2, 0, 4, 0, 0, 1, 0, 6, 1, 0, 1, 3, 1, 6, 0, 2, 1, 1, 4, 4, 0, 0, 1, 0, 2, 2, 0, 0, 1, 0, 0, 1, 3, 5, 1, 7, 1, 2, 0, 3, 2, 1, 1, 4, 2, 6, 1, 1, 2, 2, 0, 1, 0, 0, 1, 2, 2, 3, 1, 1, 2, 0, 1
Offset: 1

Views

Author

Giovanni Teofilatto, Jun 15 2005

Keywords

Comments

This is to A046933 as semiprimes A001358 are to primes A000040. This is to composites A002808 as A088700 is to primes. a(A070552(i)) = 0. - Jonathan Vos Post, Oct 10 2007
a(n) = 0 if A001358(n) is in A070552. - Jonathan Vos Post, Mar 11 2007

Examples

			a(1) = 0 because between 2*2 and 2*3 there is 5 and it is not composite.
a(2) = 1 because between 2*3 and 3*3 there is 8 = 2*2*2;
a(6) = 3 because between 3*5 and 3*7 there are three composite numbers: {16, 18, 20}.
a(10) = 4 because between 2*13 and 3*11 there are four composite numbers: {27, 28, 30, 32}.
a(15) = 4 because there are four composites {40,42,44,45} between semiprime(15)=39 and semiprime(16)=46.
		

Crossrefs

Semiprime analog of A046933.

Programs

  • Maple
    with(numtheory): sp:=proc(n) if bigomega(n)=2 then n else fi end: SP:=[seq(sp(n),n=1..450)]: for j from 1 to nops(SP)-1 do ct:=0: for i from SP[j]+1 to SP[j+1]-1 do if isprime(i)=false then ct:=ct+1 else ct:=ct fi: od: a[j]:=ct: od:seq(a[j],j=1..nops(SP)-1); # Emeric Deutsch, Mar 30 2007
    A001358 := proc(nmin) local a,n ; a :=[] ; n := 1 ; while nops(a) < nmin do if numtheory[bigomega](n) = 2 then a := [op(a),n] ; fi ; n := n+1 ; od: RETURN(a) ; end: A000720 := proc(n) numtheory[pi](n) ; end: A065855 := proc(n) n-A000720(n)-1 ; end: A108197 := proc(nmin) local a,n,a001358 ; a001358 := A001358(nmin+1) ; a := [] ; for n from 1 to nops(a001358)-1 do a := [op(a), A065855(op(n+1,a001358))-A065855(op(n,a001358))-1 ] ; od; RETURN(a) ; end: A108197(100) ; # R. J. Mathar, Oct 23 2007
  • Mathematica
    terms = 105;
    cc = Select[Range[4 terms], CompositeQ] /. c_ /; PrimeOmega[c] == 2 -> 0;
    SequenceReplace[cc, {0, c___ /; FreeQ[{c}, 0]} :> Length[{c}]][[;; terms]] (* Jean-François Alcover, Mar 31 2020 *)

Formula

a(n) = A065855(A001358(n+1)) - A065855(A001358(n)) - 1. - R. J. Mathar, Oct 23 2007
a(n)=A065516(n)-1-A088700(n). - R. J. Mathar, Jul 31 2008

Extensions

Corrected and extended by Ray Chandler, Jul 07 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 13 2007
Further edited by N. J. A. Sloane at the suggestion of R. J. Mathar, Jul 01 2008

A114404 4-almost prime gaps. First differences of A014613.

Original entry on oeis.org

8, 12, 4, 14, 2, 4, 21, 3, 4, 2, 10, 4, 22, 6, 3, 1, 4, 10, 2, 4, 28, 5, 7, 2, 6, 6, 10, 5, 3, 4, 2, 14, 2, 10, 16, 18, 2, 1, 9, 2, 7, 13, 2, 10, 2, 2, 4, 2, 1, 13, 8, 3, 1, 4, 10, 24, 10, 17, 3, 15, 1, 2, 10, 4, 8, 4, 2, 2, 3, 15, 3, 3, 6, 3, 7, 4, 10, 4, 8, 6, 4, 2, 2, 8, 4, 1, 35, 1, 4, 7, 4, 8, 6
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Examples

			a(1) = 8 = 24-16 where 16 is the first 4-almost prime and 24 is the second.
a(2) = 12 = 36-24.
a(3) = 4 = 40-36.
a(4) = 14 = 54-40.
a(5) = 2 = 56-54.
a(6) = 4 = 60-56.
a(7) = 21 = 81-60.
a(13) = 22 = 126-104.
a(21) = 28 = 184-156.
		

Crossrefs

Programs

  • Maple
    A114404 := proc(nmax) local a,i,a014613 ; a := [] ; i := 1 ; a014613 := -1 ; while nops(a) < nmax do if numtheory[bigomega](i) = 4 then if a014613 > 0 then a := [op(a),i-a014613] ; fi ; a014613 := i ; fi ; i := i+1 ; end: a ; end: A114404(200) ; # R. J. Mathar, May 10 2007
  • Mathematica
    Differences[Select[Range[800],Total[FactorInteger[#][[All,2]]]==4&]] (* Harvey P. Dale, Feb 14 2017 *)
    Select[Range[1000],PrimeOmega[#]==4&]//Differences (* Harvey P. Dale, May 12 2018 *)

Formula

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

Extensions

Corrected and extended by R. J. Mathar, May 10 2007

A114406 6-almost prime gaps. First differences of A046306.

Original entry on oeis.org

32, 48, 16, 56, 8, 16, 84, 12, 16, 8, 40, 16, 70, 18, 24, 12, 4, 16, 40, 8, 16, 105, 7, 20, 28, 8, 18, 6, 24, 40, 20, 12, 16, 8, 56, 8, 40, 64, 30, 42, 8, 4, 27, 9, 8, 28, 52, 8, 30, 10, 8, 8, 16, 8, 4, 52, 32, 12, 4, 16, 40, 96, 40, 5, 63, 12, 6, 54, 4, 8, 40, 2, 14, 32, 16, 8, 8, 12, 45
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Examples

			a(1) = 32 = 96-64 where 64 is the first 6-almost prime and 96 is the second.
a(2) = 48 = 144-96.
a(3) = 16 = 160-144.
a(4) = 56 = 216-160.
a(5) = 8 = 224-216.
a(6) = 16 = 240-224.
a(7) = 84 = 324-240.
a(8) = 12 = 336-324.
a(22) = 105 = 729-624.
		

Crossrefs

Formula

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

Extensions

More terms from R. J. Mathar, Aug 31 2007

A114407 7-almost prime gaps. First differences of A046308.

Original entry on oeis.org

64, 96, 32, 112, 16, 32, 168, 24, 32, 16, 80, 32, 140, 36, 48, 24, 8, 32, 80, 16, 32, 210, 14, 40, 56, 16, 36, 12, 48, 80, 40, 24, 32, 16, 112, 16, 80, 107, 21, 60, 84, 16, 8, 54, 18, 16, 56, 104, 16, 60, 20, 16, 16, 32, 16, 8, 104, 64, 24, 8, 32, 80, 192, 80, 10, 126, 24, 12
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Examples

			a(1) = 64 = 192-128 where 128 is the first 7-almost prime and 192 is the second.
a(2) = 96 = 288-192.
a(3) = 32 = 320-288.
a(4) = 112 = 432-320.
a(5) = 16 = 448-432.
a(6) = 32 = 480-448.
a(7) = 168 = 648-480.
a(8) = 24 = 672-648.
		

Crossrefs

Programs

  • Mathematica
    Differences[Select[Range[10000],PrimeOmega[#]==7&]] (* Harvey P. Dale, Oct 13 2019 *)

Formula

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

Extensions

Corrected and extended by R. J. Mathar, Aug 31 2007

A114408 8-almost prime gaps. First differences of A046310.

Original entry on oeis.org

128, 192, 64, 224, 32, 64, 336, 48, 64, 32, 160, 64, 280, 72, 96, 48, 16, 64, 160, 32, 64, 420, 28, 80, 112, 32, 72, 24, 96, 160, 80, 48, 64, 32, 224, 32, 160, 214, 42, 120, 168, 32, 16, 108, 36, 32, 112, 208, 32, 120, 40, 32, 32, 64, 32, 16, 208, 128, 48
Offset: 1

Views

Author

Jonathan Vos Post, Dec 03 2005

Keywords

Examples

			a(1) = 128 = 384-256 = A046310(2) - A046310(1).
a(2) = 192 = 576-384.
a(3) = 64 = 640-576.
a(4) = 224 = 864-640.
a(5) = 32 = 896-864.
a(6) 64 = 960-896.
a(7) = 336 = 1296-960.
a(8) = 48 = 1344-1296.
a(22) = 420 = 2916-2496.
		

Crossrefs

Formula

a(n) = A046310(n+1) - A046310(n).
Previous Showing 41-50 of 63 results. Next