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

A001358 Semiprimes (or biprimes): products of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form p*q where p and q are primes, not necessarily distinct.
These numbers are sometimes called semiprimes or 2-almost primes.
Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.
Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log(n)/log(log(n)) goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.
For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.
Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011
The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015
An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016
The above characterization can be simplified to "Composite numbers not divisible by a smaller term." This shows that this is the equivalent of primes computed via Eratosthenes's sieve, but starting with the set of composite numbers (i.e., complement of 1 union primes) instead of all positive integers > 1. It's easy to see that iterating the method (using Eratosthenes's sieve each time on the remaining numbers, complement of the previously computed set) yields numbers with bigomega = k for k = 0, 1, 2, 3, ..., i.e., {1}, A000040, this, A014612, etc. - M. F. Hasler, Apr 24 2019
For all n except n = 2, a(n) is a deficient number. - Amrit Awasthi, Sep 10 2024
It is reasonable to assume that the "comforting numbers" which John T. Williams found in Chapter 3 of Milne's book "The House at Pooh Corner" are these semiprimes. Winnie-the-Pooh wonders whether he has 14 or 15 honey pots and concludes: "It's sort of comforting." To arrange a semiprime number of honey pots in a rectangular way, let's say on a shelf, with the larger divisor parallel to the wall, there is only one solution and this is for a simple mind like Winnie-the-Pooh comforting. - Ruediger Jehn, Dec 12 2024

Examples

			From _Gus Wiseman_, May 27 2021: (Start)
The sequence of terms together with their prime factors begins:
   4 = 2*2     46 = 2*23     91 = 7*13    141 = 3*47
   6 = 2*3     49 = 7*7      93 = 3*31    142 = 2*71
   9 = 3*3     51 = 3*17     94 = 2*47    143 = 11*13
  10 = 2*5     55 = 5*11     95 = 5*19    145 = 5*29
  14 = 2*7     57 = 3*19    106 = 2*53    146 = 2*73
  15 = 3*5     58 = 2*29    111 = 3*37    155 = 5*31
  21 = 3*7     62 = 2*31    115 = 5*23    158 = 2*79
  22 = 2*11    65 = 5*13    118 = 2*59    159 = 3*53
  25 = 5*5     69 = 3*23    119 = 7*17    161 = 7*23
  26 = 2*13    74 = 2*37    121 = 11*11   166 = 2*83
  33 = 3*11    77 = 7*11    122 = 2*61    169 = 13*13
  34 = 2*17    82 = 2*41    123 = 3*41    177 = 3*59
  35 = 5*7     85 = 5*17    129 = 3*43    178 = 2*89
  38 = 2*19    86 = 2*43    133 = 7*19    183 = 3*61
  39 = 3*13    87 = 3*29    134 = 2*67    185 = 5*37
(End)
		

References

  • Archimedeans Problems Drive, Eureka, 17 (1954), 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York (1974). See p. 211.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • John T. Williams, Pooh and the Philosophers, Dutton Books, 1995.

Crossrefs

Cf. A064911 (characteristic function).
Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).
These are the Heinz numbers of length-2 partitions, counted by A004526.
The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).
Including primes gives A037143.
The odd/even terms are A046315/A100484.
Partial sums are A062198.
The prime factors are A084126/A084127.
Grouping by greater factor gives A087112.
The product/sum/difference of prime indices is A087794/A176504/A176506.
Positions of even/odd terms are A115392/A289182.
The terms with relatively prime/divisible prime indices are A300912/A318990.
Factorizations using these terms are counted by A320655.
The prime indices are A338898/A338912/A338913.
Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.
The terms with even/odd weight are A338906/A338907.
The terms with odd/even prime indices are A338910/A338911.
The least/greatest term of weight n is A339114/A339115.

Programs

  • Haskell
    a001358 n = a001358_list !! (n-1)
    a001358_list = filter ((== 2) . a001222) [1..]
    
  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:
    seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)
    Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ M. F. Hasler, Apr 09 2008; added select() Apr 24 2019
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrt(lim), t=p;forprime(q=p, lim\t, listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011
    
  • PARI
    A1358=List(4); A001358(n)={while(#A1358M. F. Hasler, Apr 24 2019
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 2
    print([k for k in range(1, 190) if ok(k)]) # Michael S. Branicky, Apr 30 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A001358(n):
        def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].
Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002
A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010
a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 24 2012
sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1. mu(a(n)) = ceiling(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013
mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function (A008683), Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014
a(n) = A078840(2,n). - R. J. Mathar, Jan 30 2019
A100484 UNION A046315. - R. J. Mathar, Apr 19 2023
Conjecture: a(n)/n ~ (log(n)/log(log(n)))*(1-(M/log(log(n)))) as n -> oo, where M is the Mertens's constant (A077761). - Alain Rocchelli, Feb 02 2025

Extensions

More terms from James Sellers, Aug 22 2000

A006881 Squarefree semiprimes: Numbers that are the product of two distinct primes.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that phi(k) + sigma(k) = 2*(k+1). - Benoit Cloitre, Mar 02 2002
Numbers k such that tau(k) = omega(k)^omega(k). - Benoit Cloitre, Sep 10 2002 [This comment is false. If k = 900 then tau(k) = omega(k)^omega(k) = 27 but 900 = (2*3*5)^2 is not the product of two distinct primes. - Peter Luschny, Jul 12 2023]
Could also be called 2-almost primes. - Rick L. Shepherd, May 11 2003
From the Goldston et al. reference's abstract: "lim inf [as n approaches infinity] [(a(n+1) - a(n))] <= 26. If an appropriate generalization of the Elliott-Halberstam Conjecture is true, then the above bound can be improved to 6." - Jonathan Vos Post, Jun 20 2005
The maximal number of consecutive integers in this sequence is 3 - there cannot be 4 consecutive integers because one of them would be divisible by 4 and therefore would not be product of distinct primes. There are several examples of 3 consecutive integers in this sequence. The first one is 33 = 3 * 11, 34 = 2 * 17, 35 = 5 * 7; (see A039833). - Matias Saucedo (solomatias(AT)yahoo.com.ar), Mar 15 2008
Number of terms less than or equal to 10^k for k >= 0 is A036351(k). - Robert G. Wilson v, Jun 26 2012
Are these the numbers k whose difference between the sum of proper divisors of k and the arithmetic derivative of k is equal to 1? - Omar E. Pol, Dec 19 2012
Intersection of A001358 and A030513. - Wesley Ivan Hurt, Sep 09 2013
A237114(n) (smallest semiprime k^prime(n)+1) is a term, for n != 2. - Jonathan Sondow, Feb 06 2014
a(n) are the reduced denominators of p_2/p_1 + p_4/p_3, where p_1 != p_2, p_3 != p_4, p_1 != p_3, and the p's are primes. In other words, (p_2*p_3 + p_1*p_4) never shares a common factor with p_1*p_3. - Richard R. Forberg, Mar 04 2015
Conjecture: The sums of two elements of a(n) forms a set that includes all primes greater than or equal to 29 and all integers greater than or equal to 83 (and many below 83). - Richard R. Forberg, Mar 04 2015
The (disjoint) union of this sequence and A001248 is A001358. - Jason Kimberley, Nov 12 2015
A263990 lists the subsequence of a(n) where a(n+1)=1+a(n). - R. J. Mathar, Aug 13 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Zervos, Marie: Sur une classe de nombres composés. Actes du Congrès interbalkanique de mathématiciens 267-268 (1935)

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A030229, A051709, A001221 (omega(n)), A001222 (bigomega(n)), A001358 (semiprimes), A005117 (squarefree), A007304 (squarefree 3-almost primes), A213952, A039833, A016105 (subsequences), A237114 (subsequence, n != 2).
Subsequence of A007422.
Cf. A259758 (subsequence), A036351, A363923.

Programs

  • Haskell
    a006881 n = a006881_list !! (n-1)
    a006881_list = filter chi [1..] where
       chi n = p /= q && a010051 q == 1 where
          p = a020639 n
          q = n `div` p
    -- Reinhard Zumkeller, Aug 07 2011
    
  • Magma
    [n: n in [1..210] | EulerPhi(n) + DivisorSigma(1,n) eq 2*(n+1)]; // Vincenzo Librandi, Sep 17 2015
    
  • Maple
    N:= 1001: # to get all terms < N
    Primes:= select(isprime, [2,seq(2*k+1,k=1..floor(N/2))]):
    {seq(seq(p*q,q=Primes[1..ListTools:-BinaryPlace(Primes,N/p)]),p=Primes)} minus {seq(p^2,p=Primes)};
    # Robert Israel, Jul 23 2014
    # Alternative, using A001221:
    isA006881 := proc(n)
         if numtheory[bigomega](n) =2 and A001221(n) = 2 then
            true ;
        else
            false ;
        end if;
    end proc:
    A006881 := proc(n) if n = 1 then 6; else for a from procname(n-1)+1 do if isA006881(a) then return a; end if; end do: end if;
    end proc: # R. J. Mathar, May 02 2010
    # Alternative:
    with(NumberTheory): isA006881 := n -> is(NumberOfPrimeFactors(n, 'distinct') = 2 and NumberOfPrimeFactors(n) = 2):
    select(isA006881, [seq(1..205)]); # Peter Luschny, Jul 12 2023
  • Mathematica
    mx = 205; Sort@ Flatten@ Table[ Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[ mx/Prime[n]]}] (* Robert G. Wilson v, Dec 28 2005, modified Jul 23 2014 *)
    sqFrSemiPrimeQ[n_] := Last@# & /@ FactorInteger@ n == {1, 1}; Select[Range[210], sqFrSemiPrimeQ] (* Robert G. Wilson v, Feb 07 2012 *)
    With[{upto=250},Select[Sort[Times@@@Subsets[Prime[Range[upto/2]],{2}]],#<=upto&]] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    for(n=1,214,if(bigomega(n)==2&&omega(n)==2,print1(n,",")))
    
  • PARI
    for(n=1,214,if(bigomega(n)==2&&issquarefree(n),print1(n,",")))
    
  • PARI
    list(lim)=my(v=List()); forprime(p=2,sqrt(lim), forprime(q=p+1, lim\p, listput(v,p*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • Python
    from sympy import factorint
    def ok(n): f=factorint(n); return len(f) == 2 and sum(f[p] for p in f) == 2
    print(list(filter(ok, range(1, 206)))) # Michael S. Branicky, Jun 10 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A006881(n):
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 15 2024
  • Sage
    def A006881_list(n) :
        R = []
        for i in (6..n) :
            d = prime_divisors(i)
            if len(d) == 2 :
                if d[0]*d[1] == i :
                    R.append(i)
        return R
    A006881_list(205)  # Peter Luschny, Feb 07 2012
    

Formula

A000005(a(n)^(k-1)) = A000290(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
A109810(a(n)) = 4; A178254(a(n)) = 6. - Reinhard Zumkeller, May 24 2010
A056595(a(n)) = 3. - Reinhard Zumkeller, Aug 15 2011
a(n) = A096916(n) * A070647(n). - Reinhard Zumkeller, Sep 23 2011
A211110(a(n)) = 3. - Reinhard Zumkeller, Apr 02 2012
Sum_{n >= 1} 1/a(n)^s = (1/2)*(P(s)^2 - P(2*s)), where P is Prime Zeta. - Enrique Pérez Herrero, Jun 24 2012
A050326(a(n)) = 2. - Reinhard Zumkeller, May 03 2013
sopf(a(n)) = a(n) - phi(a(n)) + 1 = sigma(a(n)) - a(n) - 1. - Wesley Ivan Hurt, May 18 2013
d(a(n)) = 4. Omega(a(n)) = 2. omega(a(n)) = 2. mu(a(n)) = 1. - Wesley Ivan Hurt, Jun 28 2013
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Aug 22 2013
A089233(a(n)) = 1. - Reinhard Zumkeller, Sep 04 2013
From Peter Luschny, Jul 12 2023: (Start)
For k > 1: k is a term <=> k^A001221(k) = k*A007947(k).
For k > 1: k is a term <=> k^A001222(k) = k*A007947(k).
For k > 1: k is a term <=> A363923(k) = k. (End)
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Jan 13 2025

Extensions

Name expanded (based on a comment of Rick L. Shepherd) by Charles R Greathouse IV, Sep 16 2015

A270650 Min(i, j), where p(i)*p(j) is the n-th term of A006881.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Apr 25 2016

Keywords

Examples

			A006881 = (6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, ... ), the increasing sequence of all products of distinct primes.  The first 4 factorizations are 2*3, 2*5, 2*7, 3*5, so that (a(1), a(2), a(3), a(4)) = (1,1,1,2).
		

Crossrefs

Programs

  • Mathematica
    mx = 350; t = Sort@Flatten@Table[Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[mx/Prime[n]]}]; (* A006881, Robert G. Wilson v, Feb 07 2012 *)
    u = Table[FactorInteger[t[[k]]][[1]], {k, 1, Length[t]}];
    u1 = Table[u[[k]][[1]], {k, 1, Length[t]}]  (* A096916 *)
    PrimePi[u1]  (* A270650 *)
    v = Table[FactorInteger[t[[k]]][[2]], {k, 1, Length[t]}];
    v1 = Table[v[[k]][[1]], {k, 1, Length[t]}]  (* A070647 *)
    PrimePi[v1]  (* A270652 *)
    d = v1 - u1  (* A176881 *)
    Map[PrimePi[FactorInteger[#][[1, 1]]] &, Select[Range@ 240, And[SquareFreeQ@ #, PrimeOmega@ # == 2] &]] (* Michael De Vlieger, Apr 25 2016 *)

A270652 Max(i,j), where p(i)*p(j) is the n-th term of A006881.

Original entry on oeis.org

2, 3, 4, 3, 4, 5, 6, 5, 7, 4, 8, 6, 9, 7, 5, 8, 10, 11, 6, 9, 12, 5, 13, 7, 14, 10, 6, 11, 15, 8, 16, 12, 9, 17, 7, 18, 13, 14, 8, 19, 15, 20, 6, 10, 21, 11, 22, 16, 9, 23, 17, 24, 18, 12, 7, 25, 19, 26, 10, 13, 27, 8, 20, 28, 14, 11, 29, 21, 7, 30, 15, 22
Offset: 1

Views

Author

Clark Kimberling, Apr 25 2016

Keywords

Examples

			A006881 = (6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, ... ), the increasing sequence of all products of distinct primes.  The first 4 factorizations are 2*3, 2*5, 2*7, 3*5, so that (a(1), a(2), a(3), a(4)) = (2,3,4,3).
		

Crossrefs

Programs

  • Mathematica
    mx = 350; t = Sort@Flatten@Table[Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[mx/Prime[n]]}]; (* A006881, Robert G. Wilson v, Feb 07 2012 *)
    u = Table[FactorInteger[t[[k]]][[1]], {k, 1, Length[t]}];
    u1 = Table[u[[k]][[1]], {k, 1, Length[t]}]  (* A096916 *)
    PrimePi[u1]  (* A270650 *)
    v = Table[FactorInteger[t[[k]]][[2]], {k, 1, Length[t]}];
    v1 = Table[v[[k]][[1]], {k, 1, Length[t]}]  (* A070647 *)
    PrimePi[v1]  (* A270652 *)
    d = v1 - u1  (* A176881 *)
    Map[PrimePi[FactorInteger[#][[-1, 1]]] &, Select[Range@ 240, And[SquareFreeQ@ #, PrimeOmega@ # == 2] &]] (* Michael De Vlieger, Apr 25 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A270652(n):
        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
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        return primepi(max(primefactors(bisection(f,n,n)))) # Chai Wah Wu, Oct 23 2024

A084126 Prime factor <= other prime factor of n-th semiprime.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 3, 2, 5, 2, 3, 2, 5, 2, 3, 2, 7, 3, 5, 3, 2, 2, 5, 3, 2, 7, 2, 5, 2, 3, 7, 3, 2, 5, 2, 3, 5, 2, 7, 11, 2, 3, 3, 7, 2, 3, 2, 11, 5, 2, 5, 2, 3, 7, 2, 13, 3, 2, 3, 5, 11, 2, 3, 2, 7, 5, 2, 11, 3, 2, 5, 7, 2, 3, 13, 2, 5, 3, 13, 3, 11, 2, 7, 2, 5, 3, 2, 2, 7, 17, 3, 5, 2, 13, 7, 2, 3, 5, 3, 2
Offset: 1

Views

Author

Reinhard Zumkeller, May 15 2003

Keywords

Comments

Lesser of the prime factors of A001358(n). - Jianing Song, Aug 05 2022

Crossrefs

Cf. A001358 (the semiprimes), A084127 (greater of the prime factors of the semiprimes).

Programs

  • Haskell
    a084126 = a020639 . a001358  -- Reinhard Zumkeller, Nov 25 2012
    
  • Mathematica
    FactorInteger[#][[1,1]]&/@Select[Range[500],PrimeOmega[#]==2&] (* Harvey P. Dale, Jun 25 2018 *)
  • Python
    from sympy import primepi, primerange, primefactors
    def A084126(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//p) for p in primerange(s+1)))
        return min(primefactors(bisection(f,n,n))) # Chai Wah Wu, Apr 03 2025

Formula

a(n) = A020639(A001358(n)).
a(n) = A001358(n)/A006530(A001358(n)). [corrected by Michel Marcus, Jul 18 2020]
a(n) = A001358(n)/A084127(n).

A070647 Largest prime factor of sequence of numbers of the form p*q (p, q distinct primes).

Original entry on oeis.org

3, 5, 7, 5, 7, 11, 13, 11, 17, 7, 19, 13, 23, 17, 11, 19, 29, 31, 13, 23, 37, 11, 41, 17, 43, 29, 13, 31, 47, 19, 53, 37, 23, 59, 17, 61, 41, 43, 19, 67, 47, 71, 13, 29, 73, 31, 79, 53, 23, 83, 59, 89, 61, 37, 17, 97, 67, 101, 29, 41, 103, 19, 71, 107, 43, 31, 109, 73, 17
Offset: 1

Views

Author

Benoit Cloitre, May 13 2002

Keywords

Examples

			6 = 2*3 is the first number of the form p*q (p, q distinct primes) hence a(1) = 3.
		

Crossrefs

Programs

  • Haskell
    a070647 = a006530 . a006881 -- Reinhard Zumkeller, Sep 23 2011
    
  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1};f1[n_]:=Min[First/@FactorInteger[n]];f2[n_]:=Max[First/@FactorInteger[n]];lst={};Do[If[f[n],AppendTo[lst,f2[n]]],{n,0,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 10 2010 *)
  • PARI
    go(x)=my(v=List()); forprime(p=2, sqrtint(x\1), forprime(q=p+1, x\p, listput(v, [p*q,q]))); apply(v->v[2], vecsort(Vec(v),1)) \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) = P(A006881(n)) where P(x) = A006530(x) is the largest prime factor of x.
a(n) = A006881(n)/A096916(n). - Amiram Eldar, Oct 28 2024

A195758 Lesser prime factor of n-th Blum number.

Original entry on oeis.org

3, 3, 3, 3, 7, 3, 3, 7, 3, 7, 3, 3, 11, 3, 7, 3, 3, 11, 7, 3, 3, 7, 11, 3, 3, 7, 3, 19, 3, 7, 11, 3, 7, 3, 11, 3, 7, 3, 7, 19, 3, 3, 11, 3, 3, 23, 3, 7, 11, 7, 3, 11, 3, 3, 19, 3, 11, 7, 19, 11, 7, 3, 3, 7, 23, 3, 3, 7, 3, 23, 3, 19, 11, 3, 7, 3, 7, 11, 7, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 23 2011

Keywords

Crossrefs

Cf. A096916.

Programs

  • Haskell
    a195758 = a020639 . a016105
  • Mathematica
    Take[Transpose[SortBy[{#[[1]],#[[2]],#[[1]]#[[2]]}&/@With[{c=Select[ 4*Range[ 0,200]+3,PrimeQ]},Subsets[c,{2}]],Last]][[1]],90] (* Harvey P. Dale, May 20 2012 *)

Formula

a(n) * A195759(n) = A016105(n); a(n) < A195759(n);
a(n) = A020639(A016105(n)).

A176170 Smallest prime-factor of n-th product of 4 distinct primes.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2
Offset: 1

Views

Author

Keywords

Comments

FactorInteger[210]=2*3*5*7,...

Crossrefs

Programs

  • Mathematica
    f0[n_]:=Last/@FactorInteger[n]=={1,1,1,1};f1[n_]:=Min[First/@FactorInteger[n]];f2[n_]:=First/@FactorInteger[n][[2,1]];f3[n_]:=First/@FactorInteger[n][[3,1]];f4[n_]:=Max[First/@FactorInteger[n]];lst={};Do[If[f0[n],AppendTo[lst,f1[n]]],{n,0,2*7!}];lst
  • PARI
    n=0; i=0; while(i<10000,n++;if((4 == bigomega(n))&&(4 == omega(n)),i++;write("b176170.txt", i, " ", factor(n)[1,1]))); \\ Antti Karttunen, Dec 06 2017

Formula

a(n) = A020639(A046386(n)). - Antti Karttunen, Dec 06 2017

A176881 a(n)=p-q for n-th product of 2 distinct primes p and q (q

Original entry on oeis.org

1, 3, 5, 2, 4, 9, 11, 8, 15, 2, 17, 10, 21, 14, 6, 16, 27, 29, 8, 20, 35, 4, 39, 12, 41, 26, 6, 28, 45, 14, 51, 34, 18, 57, 10, 59, 38, 40, 12, 65, 44, 69, 2, 24, 71, 26, 77, 50, 16, 81, 56, 87, 58, 32, 6, 95, 64, 99, 22, 36, 101, 8, 68, 105, 38, 24, 107, 70, 4, 111, 42, 76, 6, 80
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2010

Keywords

Comments

Where products of two distinct primes are in A006881.
If Polignac's conjecture is true, then every even positive integer occurs infinitely many times in this sequence. - Clark Kimberling, Apr 25 2016

Examples

			a(1)=1 because 1=3-2 for A006881(1)=6=3*2; a(2)=3 because 3=5-2 for A006881(2)=10=5*2.
		

Crossrefs

Programs

  • Maple
    A006881 := proc(n) if n = 1 then 6; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 and nops(numtheory[factorset](a)) =2 then return a; end if; end do: end if; end proc:
    A020639 := proc(n) numtheory[factorset](n) ; min(op(%)) ; end proc:
    A006530 := proc(n) numtheory[factorset](n) ; max(op(%)) ; end proc:
    for n from 1 to 130 do c := A006881(n) ; printf("%d,",A006530(c)-A020639(c)) ; end do:
    # R. J. Mathar, May 01 2010
  • Mathematica
    mx = 350; t = Sort@Flatten@Table[Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[mx/Prime[n]]}]; (* A006881, Robert G.Wilson v, Feb 07 2012 *)
    u = Table[FactorInteger[t[[k]]][[1]], {k, 1, Length[t]}];
    u1 = Table[u[[k]][[1]], {k, 1, Length[t]}]  (* A096916 *)
    PrimePi[u1]  (* A270650 *)
    v = Table[FactorInteger[t[[k]]][[2]], {k, 1, Length[t]}];
    v1 = Table[v[[k]][[1]], {k, 1, Length[t]}]  (* A070647 *)
    PrimePi[v1]  (* A270652 *)
    d = v1 - u1  (* A176881 *)  (* Clark Kimberling, Apr 25 2016 *)

Extensions

Entries checked by R. J. Mathar, May 01 2010

A176171 Second prime-factor of n-th product of 4 distinct primes.

Original entry on oeis.org

3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 5, 3, 3, 3, 3, 5, 5, 3, 3, 3, 3, 3, 3, 5, 5, 3, 5, 3, 3, 3, 3, 5, 3, 3, 5, 3, 3, 3, 5, 3, 3, 3, 5, 7, 3, 5, 3, 5, 3, 5, 5, 3, 5, 3, 3, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 3, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 7, 5, 3, 5, 3, 3, 7, 3, 5, 3, 5, 3, 3, 5, 5, 3, 5, 3, 5, 3, 3, 3
Offset: 1

Views

Author

Keywords

Comments

FactorInteger[210]=2*3*5*7,...

Crossrefs

Programs

  • Mathematica
    f0[n_]:=Last/@FactorInteger[n]=={1,1,1,1};f1[n_]:=Min[First/@FactorInteger[n]];f2[n_]:=First/@FactorInteger[n][[2,1]];f3[n_]:=First/@FactorInteger[n][[3,1]];f4[n_]:=Max[First/@FactorInteger[n]];lst={};Do[If[f0[n],AppendTo[lst,f2[n]]],{n,0,2*7!}];lst
Showing 1-10 of 13 results. Next